Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Git merge question

Posted on 2011-09-19
3
Medium Priority
?
1,018 Views
Last Modified: 2012-05-12
I was trying to merge a branch, and got this error:

lv@machine:~/bp (integration)$ git merge aarp-perks
warning: Failed to merge submodule app/plugins/surveys (commits not present)
Auto-merging app/plugins/surveys
CONFLICT (submodule): Merge conflict in app/plugins/surveys
Automatic merge failed; fix conflicts and then commit the result.

so I did a gitstatus:


lv@machine:~/bp (integration)$ git status
# On branch integration
# Changes to be committed:
#
#      modified:   app/plugins/bp_events
#
# Unmerged paths:
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#      both modified:      app/plugins/surveys
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#      modified:   app/plugins/bp_events (untracked content)
#


Anyone know how I can resolve this so that I can merge the branch I am working on? I am new to this.
0
Comment
Question by:lvollmer
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
JESii earned 2000 total points
ID: 36564123
Try using:
   git mergetool
this opens your default diff program (or prompts you to select one if you haven't already) and then helps you figure out how to resolve the merge conflict (on app/plugins/surveys). Here's a link about that: http://gitguru.com/2009/02/22/integrating-git-with-a-visual-merge-tool/

Also, here's a terrific (free) book about git by Scott Chacon - highly recommended! Here's the section on branching and merging: http://progit.org/book/ch3-2.html
0
 

Author Comment

by:lvollmer
ID: 36567073
is there anyway to just overwrite the files on my machine with the latest copy of the repository?
0
 

Author Closing Comment

by:lvollmer
ID: 36567173
actually, that is easier then i thought it would be. thanks for the link.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question