git常見問題解決

記錄在開發過程當中遇到的git問題,邊解決問題邊學習,常見的命令後續找時間再補充,儘可能寫一個完整的教程。

git處理衝突

當拉取下來的文件與本地修改的文件有衝突,先提交你的改變,或者先將你的改變暫時存儲起來html

一、將本地修改存儲起來

git stash

二、pull內容

git pull

三、還原暫存的內容

git stash pop stash@{0}

也能夠簡寫git

git stash pop

參考:https://www.cnblogs.com/wteam...學習

git另外一個進程還在運行

問題描述

出現這種狀況多是git在執行的過程當中,你停止以後異常,進程一直停留this

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

問題緣由

由於進程的互斥,因此資源被上鎖,可是因爲進程忽然崩潰,因此將來得及解鎖,致使其餘進程訪問不了。code

問題解決

打開隱藏文件夾選項,進入工做區文件目錄的隱藏文件.git,把其中的index.lock問價刪除掉htm

相關文章
相關標籤/搜索