git Shell common commands

Source: Internet
Author: User
Tags diff git clone git shell

Git branch view all local branches git status View current status git commit commit git branch-a view all branches git branch-r view all branches git commit-am "Init" commit and raise Release git remote add origin [Email protected]:ndshowgit push Origin master pushes the file to the server Git remote show origin display remote library origin Resources GIT push Origin master:developgit push Origin Master:hb-dev associate a local library with a library on the server git checkout--track origin/dev switch to the remote dev branch  git branch-d master Develop delete local library developgit Checkout-b Dev build a new local branch devgit merge origin/dev Merge branch Dev with the current branch git checkout Dev switch to local dev branch git remote show view remote library git Add. git rm file name (including path) remove the specified file from git git clone git://github.com/schacon/grit.git from the server Pull the code down git config--list look at all users git ls-files look at git rm [file name] has been committed to 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 in commit git commit-m "This is the message describing the commit" to add a commit message Git commit-a-A is on behalf of Add, add all the changes 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 (removed from staging area and workspaces) gitRM--cached a.a Remove Files (removed from staging area only) Git commit-m remove files (removed 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 into a temporary space git stash pops the files from the temporary space POPs down

Git shell common commands

Related Article

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.