-
在 拉取 代码时 出现下列问题
The following untracked working tree files would be overwritten by merge: src/views/tally/XXXXXX Please move or remove them before you merge.
有 如 下解决方法 :
git fetch --all
会让输入 用户名
然后进行 第二条
2.如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:
1.git reset --hard
2.git pull
其中git reset是针对版本,如果想针对文件回退本地修改,使用
untracked working tree file
3.如果希望保留生产服务器上所做的改动,仅仅并入新配置项, 处理方法如下:
git stash
git pull
git stash pop
然后可以使用git diff -w +文件名 来确认代码自动合并的情况.
-
There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/**<branch>** XXXX (xxx 为你本地的分支名,branch 是你远程 需要连接的分支)
执行 git branch --set-upstream-to=origin/ ‘ 远程分支名’ 本地分支名