Thank you very much for your help Konstantin!!  I submitted the first

git checkout --theirs public/images/NewMexico_jul_1.jpg

And received the following error:

error: pathspec 'public/images/NewMexico_jul_1.jpg' did not match any
file(s) known to git.


Thanks, Ken

On Oct 13, 9:33 am, Konstantin Khomoutov <> wrote:
> On Oct 13, 8:10 pm, Ken <> wrote:
> > I need some help.  I have two branches: "master" and "add_articles".
> > I've been doing my work in add_articles and I wanted to merge the
> > changes in to master prior to doing a deploy of my application.
> > Here's the sequence of events:
> > git branch - showed the active branch to be add_articles
> > git checkout master - switched the active branch to master
> > git merge add_articles - gave me this error:
> > warning: Cannot merge binary files: HEAD:public/images/
> > NewMexico_jul_1.jpg vs. add_articles:public/images/NewMexico_jul_1.jpg
> > Auto-merging app/views/layouts/two_column.html.erb
> > Auto-merging public/images/NewMexico_jul_1.jpg
> > CONFLICT (add/add): Merge conflict in public/images/
> > NewMexico_jul_1.jpg
> > Automatic merge failed; fix conflicts and then commit the result.
> > I wasn't sure what to do so I tried deleting the NewMexico_jul_1.jpg
> > file from the public/images directory in master.  That didn't work.  I
> > got the following message:
> > fatal: You are in the middle of a conflicted merge.
> > I tried doing a "git rm" command to remove the jpg file and got this
> > message:
> > public/images/NewMexico_jul_1.jpg: needs merge
> > I'm totally stuck.  Can someone tell me how to proceed?
> Use git-checkout with either --theirs on --ours command line option
> for the conflicting file to get its contents set to either that of its
> copy in the add_articles branch ("theirs", that is, "what's being
> merged") or to that of its copy on the current branch ("ours"). Then
> follow the update with git-add for that file to push the content you
> deem to be correct to the index and hence prepare it for commit.
> That is, if you want to replace the file by its copy from the branch
> being merged, do this:
> $ git checkout --theirs public/images/NewMexico_jul_1.jpg
> $ git add public/images/NewMexico_jul_1.jpg
> $ git commit
> I've recorded a sample session which simulates what you should have
> done here:

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to