Bug
Conclusion
Staging Workspace Status
git stash
View staged workspace status
git stash list
Restore all staging states, but do not delete staging content
git stash apply
Restores the specified staging state, but does not delete the staging content
git stash apply stash@{<id>}
delete staging content
git stash drop
Restoring the staging state while deleting the staging content
git stash pop
Copy a specific commit to the current branch
git cherry-pick <commit_id>
Caption
When fixing bugs, we fix them by creating a new bug branch, then merge, and finally delete;
When the work at hand is not completed, first git stash
the work site, then go to fix the bug, and after the fix, git stash pop
, and return to the work site;
If you want to merge the bugs fixed on the master branch into the current dev branch, you can use the git cherry-pick <commit_id>
command to "copy" the revisions submitted by the bug to the current branch to avoid duplication of effort.