以下是我的回購狀態。意外退房後取回更改?
[~/rails_apps/jekyll_apps/nepalonrails (design)⚡] ➔ gst
# On branch design
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: _layouts/default.html
# deleted: _site/blog/2010/04/07/welcome-to-niraj-blog/index.html
# deleted: _site/blog/2010/04/08/the-code-syntax-highlight/index.html
# deleted: _site/blog/2010/05/01/showing-demo-to-kalyan/index.html
# deleted: _site/config.ru
# deleted: _site/index.html
# deleted: _site/static/css/style.css
# deleted: _site/static/css/syntax.css
# modified: static/css/style.css
#
no changes added to commit (use "git add" and/or "git commit -a")
Accedently,我做了git checkout -f
現在的變化都沒有了它我不是應該做的。
[~/rails_apps/jekyll_apps/nepalonrails (design)⚡] ➔ git co -f
[~/rails_apps/jekyll_apps/nepalonrails (design)] ➔ gst
# On branch design
nothing to commit (working directory clean)
[~/rails_apps/jekyll_apps/nepalonrails (design)] ➔
我可以找回變化嗎?
對於我的git 1.7.9.5,上述別名與'意外的EOF'錯誤。試圖取代';' '&&'。試過「$ @」而不是「$ *」:strace說參數不會傳遞給execve。試過一個「f(){...}; f」。沒有成功。以上是否適用於其他人? – alexei 2014-10-08 20:15:42
@alexei我沒有使用年齡。我必須根據http://blogs.atlassian.com/2014/10/advanced-git-aliases/ – VonC 2014-10-08 20:24:01