简体   繁体   中英

Updating forks on Bitbucket/Git

I am working with 2 friends in a project.

There is a Main Project which I did a Fork(main fork), then my other 2 friends create a Fork of my Fork (haha sorry I felt stupid explaining this), now I just update my Fork with some code, how my friends can update their Forks with the new updates I did on mine?

You push your changes from your local copy to your forked-repo. Your friends add your original fork as a remote to their local repos. They pull from you, and push to their forks. Here are the specifics for your friends:

git remote add nietzsche <url-to-your-fork>
git fetch nietzsche
# do stuff
git push origin <refs>

Where do stuff is checkout branches from nietzsche and/or merge to master or other branches. For instance:

git checkout master
git merge nietzsche/master
# resolve any conflicts
git push origin 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