雖然試圖還原一個承諾我對我的.emacs.d文件夾的存儲庫時我得到以下信息:Git恢復錯誤信息?
[email protected]> git revert 7fe3f
error: could not revert 7fe3f0b... .emacs.d contents from ubuntu hp 15
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
我所試圖做的是我對init.el文件所做的反向變化並隨之而來的是我試圖扭轉的另一項承諾。我寧願復原而不復位 - 因爲據我所知,後者完全消除了最近的提交。我想創建一個新的提交,以便我可以「恢復」恢復。
換句話說什麼,我試圖做的是這個
Git Commits [A]...[B]
將恢復到
Git Commits [A]...[B]...[A']
難道我做錯了什麼?
編輯:我試圖做一個比較/合併是最好的,然後我可以另外提交,但隨後還是給了我這個新的錯誤消息:
[email protected]> git revert 7fe3f0ba3182b591f11c0b59e006dc6c990b7470
fatal: Your local changes would be overwritten by revert.
Please, commit your changes or stash them to proceed.
我怎麼告訴它忽略(但不刪除)未分檔的文件,而不訴諸於.gitigore文件。我坦率地不關心大多數非臨時文件,它們是emacs臨時文件等。
Git告訴你該怎麼做:解決衝突 –
什麼confilict? – haziz
'git status'會告訴你。 –