当前位置:   article > 正文

idea解决Untracked Files Prevent Merge问题_idea untracked files prevent merge

idea untracked files prevent merge

idea 打开terminals直接操作git

Step 1: Cleaning Up the Working Copy
First, you’ll need to make sure your working copy doesn’t contain these conflicting changes anymore. There are two ways to achieve this:

a) Saving Local Changes on a Stash
If you want to preserve your local changes, you can safely store them on a Stash. They will be available in case you want them back at a later point.

$ git stash --include-untracked
b) Discarding Local Changes
If you are sure that you don’t need them anymore, you can discard your local changes completely:

$ git reset --hard
If you also have untracked / new files, you will have to use the “git clean” command to get rid of these, too:

$ git clean -fd
Please be careful with these commands: discarding local changes and untracked files cannot be undone!

Step 2: Pull Again
After you have cleaned up any local changes / untracked files that would have been overwritten, the pull will finally work:

$ git pull

reference: https://www.git-tower.com/learn/git/faq/git-force-pull/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/382633?site
推荐阅读
相关标签
  

闽ICP备14008679号