I have a repo where I'm seeing behavior that I don't understand.
Ill refer to the repo that this is occuring on as the 'bad repo', all of the following sequences were run on that one.
It doesn't matter what commit I reset to, same conflicting behavior. The files it reports as conflicting seem to be the ones that were changed in the commit I reset to.
1) Sequence 2 is only happening on the 'bad repo', the same sequence of commands results in no conflicts on a fresh clone, or any one else's. What is it about the one persons repo could be causing this?
2) Why would adding an arbitrary file in sequence 2 cause the pull --rebase to conflict? It worked fine as in sequence 1 when there was no changes.
3) Basically, I don't understand why sequence 2 is causing conflicts, given that 1,3,4 all work fine.
.git/config has: [branch "media"] remote = origin merge = refs/heads/media
Here are the sequences of commands I'm running and the results:
Sequence 1(reset and pull)
$ git reset --hard 68a170d HEAD is now at 68a170d Fixes issues with nested attribute sites $ git status # On branch media # Your branch is behind 'origin/media' by 7 commits, and can be fast-forwarded. # nothing to commit (working directory clean) $ git pull --rebase First, rewinding head to replay your work on top of it... Fast-forwarded media to 4c7d9cf046368d4c7770d3b590bf3c1d1f14d480.
Sequence 2(reset add file pull)
$ git reset --hard 68a170d HEAD is now at 68a170d Fixes issues with nested attribute sites $ touch someblahrandomfile $ git add someblahrandomfile $ git commit -m 'blah' [media 9bf2bfb] blah 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 someblahrandomfile $ git status # On branch media # Your branch and 'origin/media' have diverged, # and have 1 and 7 different commit(s) each, respectively. # nothing to commit (working directory clean) $ git pull --rebase First, rewinding head to replay your work on top of it... Applying: Fixed verify methods Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging app/controllers/jet_controller.rb Auto-merging app/models/claim.rb Auto-merging app/models/site.rb Auto-merging app/models/user.rb CONFLICT (content): Merge conflict in app/models/user.rb Failed to merge in the changes. Patch failed at 0001 Fixed verify methods When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort".
Sequence 3(reset add file pull with extra params)
$ git reset --hard 68a170d HEAD is now at 68a170d Fixes issues with nested attribute sites $ touch zz $ git add zz $ git commit -m 'blah4' [media c79214d] blah4 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 zz $ git status # On branch media # Your branch and 'origin/media' have diverged, # and have 1 and 7 different commit(s) each, respectively. # nothing to commit (working directory clean) $ git pull --rebase -- origin media * branch media -> FETCH_HEAD First, rewinding head to replay your work on top of it... Applying: blah4
Sequence 4(reset and rebase)
$ git reset --hard 68a170d HEAD is now at 68a170d Fixes issues with nested attribute sites $ touch vv $ git add vv $ git commit -m 'blah7' [media 6c3f42b] blah7 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 vv $ git status # On branch media # Your branch and 'origin/media' have diverged, # and have 1 and 7 different commit(s) each, respectively. # nothing to commit (working directory clean) $ git rebase origin/media First, rewinding head to replay your work on top of it... Applying: blah7
Additional Info
a) The bad repo is on a Mac osx 10.6.4
b) Git 1.7.1
c)
color.branch=auto color.diff=auto color.status=auto color.branch.current=yellow reverse color.branch.local=yellow color.branch.remote=green color.diff.meta=yellow bold color.diff.frag=magenta bold color.diff.old=red bold color.diff.new=green bold color.status.added=yellow color.status.changed=green color.status.untracked=cyan merge.tool=opendiff mergetool.tool=opendiff difftool.difftool=opendiff gui.recentrepo=/git/MYREPO user.name=USER user.email=EMAIL alias.wtf=git-wtf alias.lg=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=URL branch.master.remote=origin branch.master.merge=refs/heads/master branch.media.remote=origin branch.media.merge=refs/heads/media
Update 2 (first set of >>> should be pointing the other way but couldn't get them displaying correctly)
$ git diff diff --cc app/models/user.rb index e1c31e2,f4923e6..0000000 --- a/app/models/user.rb +++ b/app/models/user.rb has_many :coupon_codes accepts_nested_attributes_for :coupon_codes >>>>>>> HEAD ======= has_many :sites, :dependent => :destroy accepts_nested_attributes_for :sites, :allow_destroy => true >>>>>>> Fixed verify methods