添加或刪除index
git add <path>... 會將working directory中的內(nèi)容添加進入git index
git reset HEAD <path>... 會將git index中path內(nèi)容刪除,重新放回working directory中。
強制服務器覆蓋本地
git fetch --all
git reset --hard origin/master
git add <path>... 會將working directory中的內(nèi)容添加進入git index
git reset HEAD <path>... 會將git index中path內(nèi)容刪除,重新放回working directory中。
git fetch --all
git reset --hard origin/master