分支管理

查看分支

git branch
gitk --all &

建立 / 刪除分支

git branch <new branch name>
git checkout <branch name>
git checkout -b <new branch name>
git branch -f <branch name> <commit id>
git branch -D <branch name>
git log <branch name>

Commit Tree

git checkout <commit id>
git checkout -b <new branch name> <commit id>

Rebase 合併分支

git cherry-pick <commit 1> <commit 2> ...
git rebase <new base>
git rebase <new base> <branch name>
git reset --hard ORIG_HEAD

Merge 合併分支

git merge <branch name>
git merge --no-ff <branch name>




results matching ""

    No results matching ""