Solved

Git merge question

Posted on 2011-09-19
3
989 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
JESii earned 500 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
push Book Today button to right 10 103
Node.js 11 82
What is the optimum percentage to save images for webs. 4 49
why is my slideshow so small on this wordpress site? 7 41
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

759 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