使用sourcetree切换仓库地址及报错git

编程入门 行业动态 更新时间:2024-10-26 14:29:20

使用sourcetree切换仓库地址及<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错git"/>

使用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

本文发布于:2024-02-11 14:14:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1681419.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   仓库   地址   sourcetree   git

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!