如果我在BranchA中做了一些更改,然后签出BranchB,那么这些文件会自动合并到BranchA中。
我过去经常收到一个警告,迫使我提交或隐藏更改:类似于:my_file.rb would be overwritten by merge. Cannot merge.
在某种程度上,这种情况停止了发生。有什么想法吗?这是我的.getconfig
[user]
name = <my name>
email = <my email>
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[color]
ui = always
interactive = always
diff = auto
branch = auto
status = auto
[color "diff"]
new = cyan
old = magenta
frag = yellow
meta = green
commit = normal
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p发布于 2011-05-12 22:38:29
git抱怨的只是你还没有提交的更改。
发布于 2011-05-12 22:52:06
更新:
在回答一个类似的问题时,我意识到我在其他地方也回答了这个问题,在搜索的过程中,我也遇到了我之前做过的这个答案。下面是这个答案的链接,我相信它是正确的:
Git branches behaving strangely
老生常谈:
除非您使用的是git checkout -m或-f,否则它应该仍然这样说。
git status跟你说了什么?
https://stackoverflow.com/questions/5979685
复制相似问题