Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
git:commit-into-master [2009/04/22 18:10] andrei created |
git:commit-into-master [2010/01/15 09:22] (current) andrei added link to the commit guidelines and the repo layout |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== GIT push into master howto ===== | ===== GIT push into master howto ===== | ||
- | This howto assumes you did some local changes into your local master branch, you have commited them and now you want to publish them in the public repository. It assumes that you start in your local master branch (git checkout master). | + | This howto assumes you did some local changes into your local master branch, you have commited them and now you want to publish them in the public repository. It assumes that you start in your local master branch (//git checkout master//). For the commit guidelines see [[devel: |
- | If you want to pushd some changes you did in some other local branch, skip to the next section. | + | |
- | | + | If you want to push some changes you did in some other local branch, just replace // |
+ | in //git push origin master: | ||
+ | | ||
+ | < | ||
+ | $ git fetch origin; git log origin/ | ||
+ | # alternatively you could try git whatchanged origin/ | ||
+ | # instead of git log and/or add --graph --color to git log / git whatchanged | ||
+ | </ | ||
+ | |||
+ | * try a push directly (1) | ||
< | < | ||
$ git push origin master: | $ git push origin master: | ||
Line 19: | Line 27: | ||
< | < | ||
+ | $ git fetch | ||
$ git pull --ff --rebase origin master | $ git pull --ff --rebase origin master | ||
</ | </ | ||
Line 49: | Line 58: | ||
</ | </ | ||
- | * if you get a merge conflict then fix-it and proceed as instructed (edit the file with the conflict, use git add < | + | |
- | **NOTE:** you could update your branch (3) also with //git pull --ff// (no // | + | **NOTE:** you could update your branch (3) also with //git pull --ff// (no // |
+ | |||
+ | * if when trying the rebase you get something like: | ||
+ | < | ||
+ | $ git pull --rebase origin master | ||
+ | refusing to pull with rebase: your working tree is not up-to-date | ||
+ | </ | ||
+ | it means you have some uncomitted local changes. Commit them (//git add ...// && //git commit//) or save them for latter use/review (//git stash save "local changes"// | ||
+ | |