git simple implementation of server-side migration and backup steps

Source: Internet
Author: User
Tags commit git clone

The goal to achieve is to git the server-side code, migrate, or copy, and the original commit record is preserved, between two git services, unaffected by each other.

1 from the old Git service end clone a copy of the bare version library

# git clone--bare git@192.168.10.202:develop/test.git

2, set up a new Git server, not in detail here, not the focus of this article, Git@192.168.10.201:develop/test1.git
3, with local mirroring, submitting code to the new git server


# CD Test.git//Plus--bare, folder will have. git suffix

# git push--mirror git@192.168.10.201:develop/test1.git

4, delete local code, new git server, clone code, and view submit record


# CD ...
# RM-RF Test.git
# git clone git@192.168.10.201:develop/test1.git
# CD Test1
# git Log//view commit history

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.