最新消息:20190529 VPS服务器已从腾讯云香港换为Vultr新加坡,主题仍用朋友推荐的大前端D8

[已解决]git stash 丢弃

Git crifan 1099浏览 0评论

执行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

Git – git-stash Documentation

<code>drop [-q|--quiet] [&lt;stash&gt;]

Remove a single stashed state from the stash list. When no &lt;stash&gt; is given, it removes the latest one. i.e. stash@{0}, otherwise &lt;stash&gt; must be a valid stash log reference of the formstash@{&lt;revision&gt;}.
</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 丢弃

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
63 queries in 0.093 seconds, using 18.62MB memory