![]() |
![]() |



git config --global user.name "John
Doe"git config --global user.email "johndoe@example.com"
git clone
git://github.com/schacon/grit.gitgit clone git://github.com/schacon/grit.git mygrit
git initgit init --bare
git add |
git add |
git rm --cached |
git commit [-m "message"] |
git status |
git diff [--staged] |
# a comment this is ignored *.a # no .a files !lib.a # but do track lib.a /TODO # only ignore the root TODO file, not subdir/TODO build/ # ignore all files in the build/ directory doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt
git log [-#] [-p]
[--stat]git diff [<commit>] [--stat]git diff <commit> <commit>ex: git diff HEAD~2 HEAD
ex: git diff HEAD^
git push [<local branch>]git push origin maingit pull [<remote branch>]git pull origin/maingit branch testing

git branch testing

git switch testing

git switch testing

git branch iss53git commit

git branch iss53git commit

git switch maingit switch -c hotfixgit commit

git switch maingit switch -c hotfixgit commit

git switch maingit merge hotfix

git switch maingit merge hotfix

git branch -d hotfixgit switch iss53git commit

git branch -d hotfixgit switch iss53git commit


git switch maingit merge iss53

git switch maingit merge iss53

<<<<, ----, and
>>>>git <command> --helpman git-<command>