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

相关文章
相关标签/搜索