Git Command

Call back add: git reset HEAD <file>

Call back all add: git reset HEAD .

Commit log: git reflog -[number]

Back to specific commit: git reset --hard [commit hash value]

Log: git log -[number] --author=[author];

Show List: git show --name-only [commit-sha]

Delete local branch: git branch -D <branch>

Delete remote branch: git push origin --delete <branchName>

Undo all the unstaged: git checkout .

Remove untracked file: git clean -df

Keep track on remote branch: git checkout --track [remoteBranch]

Remove untracked files: git clean -n(dry run干跑) -f(force硬删)

Long file name error resolve: git config --global core.longpaths true

 

posted @ 2014-03-05 09:32  cloudyland  阅读(314)  评论(0编辑  收藏  举报