作者:手机用户2602921303_852 | 来源:互联网 | 2023-09-09 12:28
本文由编程笔记#小编为大家整理,主要介绍了Git Statsh相关的知识,希望对你有一定的参考价值。
git statsh:
save the local change, and back to the state of your last commit
e.g before the change
[email protected]:~/Desktop/rcom_code/rcom/rcom$ git status
On branch rcom-669-write-deconfigure-message-to-cache-while-bcmapp-init
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: stack/link/source/bcmapp/code/bcmapp_fsm.c
modified: stack/link/source/bcmapp/code/bcmapp_fsm.h
modified: stack/link/source/bcmapp/code/bcmapp_fsm_entry.c
[email protected]:~/Desktop/rcom_code/rcom/rcom$ git stash
Saved working directory and index state WIP on rcom-669-write-deconfigure-message-to-cache-while-bcmapp-init: ffea477 Squashed commit of the following:
HEAD is now at ffea477 Squashed commit of the following:
[email protected]:~/Desktop/rcom_code/rcom/rcom$ git status
On branch rcom-669-write-deconfigure-message-to-cache-while-bcmapp-init up-to-date
You can reapply the stashed change to another branch by git stash apply (in the target branch)