There is a repository /abc on GitHub that I forked. So my fork is at me/abc.
Jim also forked /abc, with their repo at Jim/abc. Jim added a branch called 2.0. This branch doesn't exist on /abc.
I have already cloned by fork from me/abc locally (used GitHub for Window). I would now like to make some modifications to the 2.0 branch from Jim/abc locally, and them commit and push the changes back.
What is the best way to go about doing this?
I was able to accomplish this by doing the following:
1. Add Remote pointing to Jim/abc:
git remote add jim https://github.com/jim/abc.git
2. Fetch the repository Jim:
git fetch jim
3. Checkout the branch from the Jim/abc remote:
git checkout jim/2.0
Branch is now in "detached HEAD" state.
4. Create local branch:
git checkout -b 2.0
Branch is now checked out and ready for work locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With