If no other git process is currently running, this probably means a git process crashed in this repo

今天git突然崩溃,崩溃时正在使用创建的新分支。等到重新进入,用git checkout master命令显示

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

解决方案:

  把仓库目录里的.git/index.lock文件(文件是隐藏的)删除就可以了。删除index.lock不会影响Git使用。是说index文件被锁住了,但是还有一个index文件要进行操作。

  一个仓库配有一个.git文件夹,在这个文件夹里面生成了一个index.lock文件,导致index文件不能被操作,所以把index.lock删除就ok

时间: 2024-08-24 07:15:46

If no other git process is currently running, this probably means a git process crashed in this repo的相关文章

git 复位出现If no other git process is currently running, this probably means a git process crashed in this repo

复位到A节点的时候点了取消(终止),又去复位另外个节点,结果每次不管复位哪个都会报这个错误 fatal: Unable to create 'XXXXXXXXX' : File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is run

git报错---If no other git process is currently running...

今天帮同事上传一个代码(预生产环境),当我执行到git add 文件 的时候,出现了如下错误: If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. 网上

redis故障处理 process is already running or crashed

今天线上的一台测试库的redis,增加auth 密码验证后,我想重启一下redis,不重启不生效.结果不管怎么弄都是(error) NOAUTH Authentication required.redis-cli -a 123456 shutdown 竟然没有用,一怒之下,强制关闭了,kill -9 redis的pid号. 结果启动的时候.一致报错/var/run/redis_6379.pid exists, process is already running or crashed. 由于是测

Git学习笔记一《版本控制之道-使用Git》

1.在Windows中安装完git后,需要进行一下配置:$ git config --global user.name "zhangliang"$ git config --global user.email "[email protected]"2.用下列命令可检查上述设置是否成功:$ git config --global --listuser.name=zhangliang[email protected]3.若想在命令行窗口中使用不同的颜色显示不同类型的内容

Git常用命令大全,迅速提升你的Git水平

初始化本地git仓库(创建新仓库) git init 配置用户名 git config --global user.name "xxx" 配置邮件 git config --global user.email "[email protected]" git status等命令自动着色 git config --global color.ui true git config --global color.status autogit config --global c

【android Studio】零git知识、零脚本命令,即刻体验git版本管理魅力!

git的优点就不去多说了.阻碍咱新手体验它的唯一问题就是门槛太高,脚本看着像天书, 本文主要阐述的,就是如何在android studio上,也能像tfs那样,非常简单的操作,就能使用git进行版本管理 几个月用下来,咱每天要做的就是开始工作前,alt+下方向键,从服务端拉取数据:结束工作后,alt+上方向键,将代码提交到服务器上.就这两步,完成了版本管理. 因此,有了这篇面向新手的图文并茂的文章,一步步按照步骤下来,你就可以完成项目对git的融合. (提示:面向新手的介绍型文章,因此步骤细致繁

【搭建git+maven+jenkins持续集成环境】[一] 搭建git服务器

使用的系统是ubuntu,所以有大量apt-get命令,哈哈见谅 安装git git-core 新建一个git用户,这个用户的主目录会用来存放Git Repository. 这个用户名并非一定要叫git,可以任意指定,只不过git是比较常用的,一看就知道这个账户的作用 修改下密码 登陆 sudo apt-get install git git-core adduser git passwd git su git 以上为git安装 获取gitolite 如果没有python安装python 安装p

Git中如何利用生成SSH个人公钥访问git仓库

Git中如何利用生成SSH个人公钥访问git仓库方法(这里以coding平台为例): 1. 获取 SSH 协议地址 在项目的代码页面点击 SSH 切换到 SSH 协议, 获得访问地址, 请使用这个地址来访问您的代码仓库,如下图: 2. 生成公钥 Mac/Linux 打开命令行终端, Windows 打开 Git Bash . 输入ssh-keygen -t rsa -C “[email protected]”,( 注册的邮箱),接下来点击enter键即可(也可以输入密码). $ssh-keyge

git revert 后悔了 还原修改前的版本 + git 常用命令

昨天手残 然后在GitHub for windows 上点了revert 然后就给重置了 更手残的是又给同步了 .  但是 GitHub 会保留之前的版本 . 只要删掉本次修改就可. 解决方案:  gitshell ->> git revert HEAD 还原已经提交的修改此次操作之前和之后的commit和history都会保留,并且把这次撤销作为一次最新的提交    git revert HEAD                  撤销前一次 commit    git revert HEA