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