I have never collaborated before and now find myself needing to share this project with a few others even though I will be doing 90% of the development.
I have a private repo on github. I pushed my initial source with
git push origin master
then i created a new local branch and made some changes. Then I did some stuff. (It kinda breaks down for me here.) Now, I would like to merge my branch back into master. Locally, it says they're both up to date but on github, it says my 'master' branch has a state of '3 behind'.
Some questions in no certain order?
How do I get my valid branch merged back into master without losing my work? How should I be doing this in the future?
Step 1: Make sure all your changes are checked in.
Step 2:
git checkout master
git merge <your local branch>
Step 3:
git push origin master
And, if you want to continue working on your local branch, Step 4:
git checkout <your local branch>
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