执行git stash pop:
<code>licrifandeMacBook-Pro:iOS-Client crifan$ git stash pop Auto-merging JianDao/MessageTableViewController.swift CONFLICT (content): Merge conflict in JianDao/MessageTableViewController.swift Auto-merging JianDao/MainViewController.swift CONFLICT (content): Merge conflict in JianDao/MainViewController.swift Auto-merging JianDao/JianDao/Constants.swift CONFLICT (content): Merge conflict in JianDao/JianDao/Constants.swift Auto-merging JianDao/JianDao/AppDelegate.swift </code>
然后不想要当前的修改了。因为已经没用了。
但是stash pop后,stash还是存在。
<code>licrifandeMacBook-Pro:iOS-Client crifan$ git stash list stash@{0}: WIP on master: 636bdeb fix bug 2205 unify name character rule stash@{1}: WIP on master: 4a4e862 1. release internal test version of v1.2.0 2016.4.23 2. fix bug for no history message will always loading 3. fix bug for some time has get all message but still loading 4. optimize the multiple insert history message then scroll some distance stash@{2}: WIP on master: cb70cbe remove app update function stash@{3}: WIP on master: bdf4453 change Private chat not show receive name licrifandeMacBook-Pro:iOS-Client crifan$ </code>
想要丢弃stash
drop git stash
<code>drop [-q|--quiet] [<stash>] Remove a single stashed state from the stash list. When no <stash> is given, it removes the latest one. i.e. stash@{0}, otherwise <stash> must be a valid stash log reference of the formstash@{<revision>}. </code>
How to delete a stash created with git stash create? – Stack Overflow
How can I delete all of my Git stashes at once? – Stack Overflow
所以去:git stash drop
<code>licrifandeMacBook-Pro:iOS-Client crifan$ git stash drop Dropped refs/stash@{0} (6d987977b0c1fb18def219429594298c7effb965) licrifandeMacBook-Pro:iOS-Client crifan$ git stash list stash@{0}: WIP on master: 4a4e862 1. release internal test version of v1.2.0 2016.4.23 2. fix bug for no history message will always loading 3. fix bug for some time has get all message but still loading 4. optimize the multiple insert history message then scroll some distance stash@{1}: WIP on master: cb70cbe remove app update function stash@{2}: WIP on master: bdf4453 change Private chat not show receive name licrifandeMacBook-Pro:iOS-Client crifan$ </code>
即可。
转载请注明:在路上 » [已解决]git stash 丢弃