Git action commands

Source: Internet
Author: User

First, use Git branch to create a branch

Usage Scenario: No experience at the moment

Git branch-a Show All branches

Git branch xx create XX branch

git checkout xx switch to XX branch

Git checkout-b xx Create and switch to XX branch

Second, use Git stash save and restore work progress

Usage scenario: Develop a new feature that has not been developed yet, but need to fix a bug urgently, you can save this progress, fix the bug to commit and then resume the work progress.

Git stash saves the current work progress, git stash save ' xx ' saves progress and adds comments to the Save progress

Git stash list displays all saved work progress lists

Git stash pops restores the latest saved work progress to the workspace and removes it from the progress list, and Git stash pops "stash_id" to restore the specified work progress

Git stash apply to restore the latest progress, git stash apply "stash_id" to restore the specified work progress

The difference between git stash pop and git stash apply is whether the progress will be removed from the work progress list

Git stash clear clears the saved Progress list

git stash drop stash_id Delete the specified work progress

Git action 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.