使用git拉取自动覆盖文件?
我运行以下命令:使用git拉取自动覆盖文件?,git,Git,我运行以下命令: git pull https://bitbucket.org/NAME 然后会弹出一个错误: From https://bitbucket.org/NAME/project-tool * branch HEAD -> FETCH_HEAD Auto-merging includes/top.php CONFLICT (add/add): Merge conflict in includes/top.php 然后它有: (Branch
git pull https://bitbucket.org/NAME
然后会弹出一个错误:
From https://bitbucket.org/NAME/project-tool
* branch HEAD -> FETCH_HEAD
Auto-merging includes/top.php
CONFLICT (add/add): Merge conflict in includes/top.php
然后它有:
(Branch|MERGING)
我可以用这个覆盖它,但我只想拉这个存储库,不在乎它是否覆盖了每个文件(我已经备份)
如何使用git拉入文件并自动合并和覆盖当前文件?这将从远程获取文件并将其存储在本地存储库中
git fetch https://bitbucket.org/NAME
如果要将本地分支设置为与远程分支匹配,从而删除本地分支更改,请使用以下命令。确保备份了本地文件
git reset --merge
git reset --hard FETCH_HEAD