निम्नलिखित मेरे रेपो की स्थिति थी।आकस्मिक चेकआउट के बाद परिवर्तन वापस प्राप्त करें?
[~/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)] ➔
क्या मैं वापस बदलाव वापस कर सकता हूं?
में मेरे लिए गिट 1.7.9.5 पर रिकॉर्ड किए गए हैं, उपरोक्त उपनाम 'अप्रत्याशित ईओएफ' के साथ त्रुटियां हैं। ';' की जगह लेना साथ में '&&'। "$ *" के बजाय "$ @" का प्रयास किया: स्ट्रेस कहता है कि तर्क निष्पादित करने के लिए पास नहीं किए गए हैं। एक "एफ() {...}; एफ" का प्रयास किया। कोई सफलता नहीं। क्या उपर्युक्त सभी के लिए काम करता है? – alexei
@alexei मैंने उम्र में इसका उपयोग नहीं किया था। मुझे इसे http://blogs.atlassian.com/2014/10/advanced-git-aliases/ – VonC