I开发者_C百科f I have some changes in BranchA
and then checkout BranchB
those files are auto merged into BranchA
.
I used to get a warning that forced me to either commit or stash the changes:
something like: my_file.rb would be overwritten by merge. Cannot merge.
At some point this stopped happening. Any thoughts? Here's my .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
It's only changes that you haven't commited yet that git complains about.
Update:
While answering a similar question, I realized that I had answered this same question elsewhere as well and while searching, also came across this answer that I had made sometime earlier. Below is the link to that answer, which I believe is to be the right one:
Git branches behaving strangely
Old answer:
Unless you are using git checkout -m
or -f
it should still be saying that.
What does git status
tell you?
精彩评论