开发者

How do I merge back into master without losing my work on github?

I have never collaborated befo开发者_如何学Cre 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜