"Go" git shell command Daquan

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.