Git容易忘的command
git xxx –bare
1 2 3 4 5 6 7 8
| git init --bare
git clone --bare wiki wiki.git
cp -Rf wiki/.git wiki.git
|
git remote xxx
git diff xxx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
git diff git diff --cached git diff HEAD
git diff test git diff HEAD -- ./test
git diff xxbranch master git diff xxbranch..master git diff xxbranch...master
|
git tag xxx
1 2 3 4 5 6 7 8 9 10 11
| git tag -a v1.0 -m "tag message detail"
git show v1.0
git push origin v1.0
git push origin --tags
|
git merge xxx
1 2 3 4 5 6 7 8 9 10 11
|
git merge hotfix git merge fixes enhancements git merge --no-commit tempbranch
git mergetool git log --merge -p<path> git show :1:filename
|
git reset xxx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
git reset --bard HEAD
git chechout -- <specific.flie>
git revert HEAD
git revert HEAD^
|
git commit xxx
1 2 3 4 5 6 7 8
| git commit -a
git commit -v
git commit --amend -m "the latest commit with forgot files"
|