your local changes would be overwritten by merge. commit stash or revert them to proceed. view them

简介: error log:   your local changes would be overwritten by merge. commit stash or revert them to proceed.

error log:

 

your local changes would be overwritten by merge. commit stash or revert them to proceed. view them

  

 

You can't merge with local modifications. Git protects you from losing potentially important changes. You have three options. One is to commit the change using

git commit -m "My message"

  

The second is to stash it. stashing acts as a stack, where you can push changes, and you pop them in reverse order.

To stash type:

git stash

  

Do the merge, and than pull the stash:

git stash pop

  

The third options is to discard the local changes using git reset --hard.

 

 

http://stackoverflow.com/questions/15745045/how-do-i-resolve-git-saying-commit-your-changes-or-stash-them-before-you-can-me

 

目录
相关文章
|
9月前
|
存储 开发工具 git
【SourceTree】Your local changes to the following files would be overwritten by merge【解决办法】
【SourceTree】Your local changes to the following files would be overwritten by merge【解决办法】
|
开发工具 git
解决报错:Remove untracked files, stash or commit any changes, and try again
解决报错:Remove untracked files, stash or commit any changes, and try again
123 1
【异常】svn: E200009: Commit failed (details follow)/both sides of the move must be committed together的解决办法
svn: E200009: Commit failed (details follow)/both sides of the move must be committed together的解决办法
737 0
|
开发工具 git
git更新:Your local changes to the following files would be overwritten by merge
git更新:Your local changes to the following files would be overwritten by merge
293 0
SVN commit:remains in tree-conflict解决方案
<span style="font-size:14px">       今天提交SVN时报异常</span><span style="font-size:14px; color:rgb(255,0,0); font-family:Arial; line-height:21px">SVN commit: ……remains in tree-conflict</span><span style
3275 0
|
开发工具 git
【已解决】git取消分支合并(fatal: There is no merge to abort (MERGE_HEAD missing).)
git取消分支合并(fatal: There is no merge to abort (MERGE_HEAD missing).)
1217 0
|
Java 开发工具 Maven
git解决error: The following untracked working tree files would be overwritten by c
git解决error: The following untracked working tree files would be overwritten by c
1775 0
|
算法 安全 Linux
Git 拉取项目小技巧之切换分支error: The following untracked working tree files would be overwritten by checkout:
Git 拉取项目小技巧之切换分支error: The following untracked working tree files would be overwritten by checkout:
766 0
Git 拉取项目小技巧之切换分支error: The following untracked working tree files would be overwritten by checkout:
|
Web App开发 存储 前端开发
Why系列:如无必要, don't 使用delete
啥,你要给我讲啥, delete? 哈哈哈哈哈哈哈哈哈 这里大家可能要笑了,这不就一个操作符吗,还用单独来讲。 有这时间,还不如去看看react源码,vue源码。 我说:react源码会去看的,但是这个也很挺有意思的。
222 0
Why系列:如无必要, don't 使用delete
|
开发工具 git
Git - Error:The following untracked working tree files would be overwritten by checkout
Git - Error:The following untracked working tree files would be overwritten by checkout
821 0