Some common commands for Git

Source: Internet
Author: User

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 Ori Gin 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 server git 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 parameter 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 for add, add all the changes to Git index and then commitgit commit-a-v General commit the command git log to see your commit log git diff view the update git RM a.a not yet staged Remove files (removed from staging area and workspaces) git RM--Cached a.a Remove files (removed from staging area only) git commit-m remove (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 push to a temporary space git sta Sh pop pops the file from the temporary space 
                                              

Some common commands for Git

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.