$ git checkout -b myFeature dev
Creates MyFeature branch off dev. Do your work and then
$ git commit -am "Your message"
Now merge your changes to dev without a fast-forward
$ git checkout dev
$ git merge --no-ff myFeature
edit
Now push changes to the server
$ git push origin dev
$ git push origin myFeature
http://stackoverflow.com/questions/20101994/git-pull-from-master-into-the-development-branch
git pull from master into the development branch
git checkout dmgr2 # gets you "on branch dmgr2"
git fetch origin # gets you up to date with origin
git merge origin/master
conflict 修改完後
git add [file]
git commit
取消已暫存的檔案
git reset HEAD <file>
看目前的 branch 與其他 branch 有哪些差異,你可以使用 git diff
的指令去觀察,例如我現在想要看 master 跟 cat 這兩個 branch 的差異,我只要下:
$ git diff cat master