使用sourcetree切换仓库地址及报错git
一. 使用sourcetree切换仓库地址
1. 点击仓库-仓库设置
2. 修改地址, 从git上复制路径, 保存即可
二. 切换分支时, 报错git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks pull --no-commit origin release/20210107
From
* branch release/20210107 -> FETCH_HEAD
Updating 1aea520d2c..156bdd998a
error: Your local changes to the following files would be overwritten by merge:
eduboss-main/src/main/java/com/eduboss/service/impl/SmallClassServiceImpl.java
Please commit your changes or stash them before you merge.
Aborting
处理方法:
1.检查是否本地有修改未提交, 如有
①本地代码先commit, 再执行操作
②本地代码不需要提交, 直接选中对应文件, 丢弃即可
使用sourcetree切换仓库地址及报错git
一. 使用sourcetree切换仓库地址
1. 点击仓库-仓库设置
2. 修改地址, 从git上复制路径, 保存即可
二. 切换分支时, 报错git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks pull --no-commit origin release/20210107
From
* branch release/20210107 -> FETCH_HEAD
Updating 1aea520d2c..156bdd998a
error: Your local changes to the following files would be overwritten by merge:
eduboss-main/src/main/java/com/eduboss/service/impl/SmallClassServiceImpl.java
Please commit your changes or stash them before you merge.
Aborting
处理方法:
1.检查是否本地有修改未提交, 如有
①本地代码先commit, 再执行操作
②本地代码不需要提交, 直接选中对应文件, 丢弃即可
发布评论