项目merge request老是失败,发现是有冲突,为了解决冲突,需要在本地拿到远程分支test上的代码,直接git co test,会发现查看git br 时,出现head detached at xxxx的字样。如果在此状态进行修改代码很容易丢失,因为没有本地分支保存代码
同步远程分支的两个方法:
可以自定义本地branch名
git co -b newName origin/test
git co --track origin/test
项目merge request老是失败,发现是有冲突,为了解决冲突,需要在本地拿到远程分支test上的代码,直接git co test,会发现查看git br 时,出现head detached at xxxx的字样。如果在此状态进行修改代码很容易丢失,因为没有本地分支保存代码
同步远程分支的两个方法:
可以自定义本地branch名
git co -b newName origin/test
git co --track origin/test