Http://www.cnblogs.com/bugs/p/3384339.html
Common commands
git branch View all local branches git status View current status git commit commit git branch-A view all branches of Git branch-r View all remote branches git commit-am"Init"Submit and annotate git remote add origin [email protected]192.168.1.119: Ndshowgit push Origin master pushes files to the server Git Remote show origin displays the resources of the remote library origin GIT push origin master:developgit push Origin MASTER:HB-Dev Associates a local library with a library on the server git checkout--track origin/Dev switch to remote dev branch git branch-D Master Develop delete local library Developgit checkout-b Dev Build a new local branch Devgit merge Origin/Dev merges the branch dev with the current branch git checkout dev switches to the local dev branch git remote show view remote library git Add. git rm file name (including path) Delete the specified file from git git clone git: //Github.com/schacon/grit.git Pull the code down from the servergit config--list See all users git ls-Files See the git rm [file name] that has been committed delete a file git commit-a commit all changes to the current repos git add [file name] Add a file to git indexgit commit-v When you use the-v argument you can see the difference of commit git commit-M"This is the message describing the commit"Add commit information git commit-A-A is on behalf of Add, add all the change to git index and then commitgit commit-A-v General commit command git log see your commit log git diff view unsaved updates git rm a.a Remove files (remove from staging area and workspaces) git rm--cached a.a Remove files (remove only from staging area) git commit-M"Remove"Remove files (remove from git) git rm-f a.a forcibly remove modified files (removed from staging area and workspaces) git diff--cached or $ git diff--staged view uncommitted updates git stash push files to a temporary space in Git stash pops pops files out of temporary space
Document:
http://files.cnblogs.com/bugs/Git.7z
"Go" git shell command Daquan