简体   繁体   中英

Git un-apply stash?

I have debug code for couple situations. I store it in stashes. They touches many files. Sometimes in process of coding I need to do debug stash apply .

But after resolving situation there is no way to un-stash temporary "debug2" code back. I should do revert files or in worst case scenario only debug lines of code in classes that I`ve touched previously by hand.

I know that it possible to do first code commit , then debug stash apply and debug commit . And then do third code commit . But it's uncomfortably if I'm not sure that all working changes should go to first code commit.

Is there a way to just un-apply same debug stash code on fly?

Also maybe you know better idea how to work with temporary debug code.

这是一个示例: 取消应用存储

git stash show -p | git apply -R

Another approach to un-apply stash is :

git reset --hard

and after checking out to the branch you choose, run this in your Git Bash:

git clean -d -f

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM