Common git command logging

Source: Internet
Author: User
  1. git branch xxx new branch XXX
  2. Git branch-a View all branches (including remote)
  3. Git branch--set-upstream-to remotes/origin/xxx the current branch to the remote branch XXX
  4. git checkout-b xxx remotes/origin/xxx maps remote branch xxx to local branch xxx (git pull is needed later)
  5. Discard local modifications, forcing overrides using content from remote libraries
  6. git fetch--allgit Reset--hard origin/master

    git fetch simply downloads the contents of the remote library and does not do any of the merge git reset to point the head to the latest version just downloaded.

  7. Git Stash Staging work
  8. Git stash pre-staged work before pop recovery
  9. Git stash save "work on progress for Foo feature" staging (plus tag)
  10. Git stash list lists all the jobs that have been staged
  11. git stash apply [email protected]{n} Take out the temporary work with number n

Common git command logging

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.