Suppose you are currently working on the Dev branch, but you need to fix the bug right away, how do you handle it?
Since the work of Dev is not yet completed, it cannot be submitted,
1, use the git stash command to save the current job site, and so on after the recovery site to continue to work.
Git stash
2, assuming the bug is on the master branch, create a temporary branch from master
git checkout Master
Git checkout-b issue-101
3, modify the bug, then add to staging area, and submit
git add readme.txt
git commit-m ' fix bug 101 '
4, switch to Master branch, merge, delete issue-101 branch.
git checkout Master
git merge--no-ff-m ' merge bug fix101 ' issue-101
Git branch-d issue-101
5, back to Dev branch
git checkout Dev
6. View the Job Site
git stash List
7. Resume worker Thread
Git stash pop
It also removes the stash content while recovering.
Git Learning (8)