简体   繁体   中英

Merge public repository with private repository

I have a private repository generated from a public repository. How can I merge updates of the public repository with the private repository without removing additional files ?

You can do following steps in your private repo:

$ git remote add pub-repo <pub-repo-url>
$ git fetch pub-repo
$ git merge pub-repo/master

Then you can get the update of pub-repo.

Once the pub-repo has an update again.

You can just:

$ git pull pub-repo/master
$ git merge pub-repo/master

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM