如果只要列出這個 branch 最新的,要用:
git describe
有時候要加上 --tags
ref: http://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git
git describe
Untracked working tree file blah would be overwritten by merge
git clean
把所有沒有 track 的file 刪掉,就可以 checkout 到另一個 branch。 git clean -f
強制刪除所有untrack 的 file.git clean -f -d
這樣就會把 untracked folder 也刪除。$ git branch --set-upstream localbranchname remotename/branchname
$git branch -r
korg/master
korg/my9.1
korg/release-1.0
korg/rtk
$git checkout rtk
Branch rtk set up to track remote branch rtk from korg.
Switched to a new branch 'rtk'
$git merge mytest
$git push
>>> HEAD
=====
..
$git checkout --theirs .
$git add -u
$git commit
$git config --global merge.tool vimtool
[merge]
tool = vimdiff