This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430FR5969: GIT resolving conflicts

Part Number: MSP430FR5969

Tool/software: Code Composer Studio

Is there a step-by-step instructions on how to resolve GIT conflicts? I have done it but I have a feeling there must be a better way..

Basically the scenario is that I have GIT codebase, then user A makes commits while User B is making his own changes. As you know, this causes a conflict when User B commits (or tries to) his changes. It seems to me this is somehow too convoluted to resolve as this should be bread and butter of the git. So here's what I do:

  1. With User B fetch upstream changes to local repository
  2. (try to) commit and push my changes, which is rejected "rejected - non-fast-forward"
  3.  From the git view right click on branch->local->branch_name and pick "merge", this shows a conflict
  4. Now here I'm not sure how to proceed "properly"

One way seems to be to open up the team synchronizing view that shows conflicts, not always but it does. This has option to merge all non-conflicting edits. For conflicting edits it gets annoying since there's no button to say "this change on the left overrides the change on the right!". I can of course NOT change the file on the left but then you cannot push it as the conflict remains. With a lot of faffing around I've usually managed to get out of this situation but this may leave source files with GIT tags and other badness. 

What would be the 1-2-3 way to proceed from this point to achieve a) some changes from the remote are pulled into local while b) some changes from the local are pushed to remote?

  • Is this what you are looking for:
    help.github.com/.../
  • I'm talking about the integrated GIT in Code composer. I don't know if you're supposed to use it from command line..? Okay, I remarked seeing those conflict markers in the result file. How do I actually get them to the source file(s)? When you do merge you get this graphical conflict viewer thing..
  • Did I just lose my reply or it's held up by moderators..? Anyways.

    I'm using the built-in git in Code Composer which has graphical front end. Can I even use it from command line like that? Anyways as that example shows, merging conflicting source files SHOULD be straightforward operation as it's done as a matter of course. 

    I did mention I saw those conflict tags in the source files but I'm not sure how to get them. If you use the synchronize tool you get this graphical composer view but as I complained before, it works solely on basis of server-to-local direction, there's no straightforward way to push edited file in the other direction. Or perhaps there is and I'm just too dense to figure it out. 

  • Looks like your reply went through. Moderators don't review posts prior to them going live.

    I haven't used the GIT integration much other than a quick test a couple years back. In CCS we are using the stock integration that comes from Eclipse.

    I can try to setup a repository and see if I can figure out the steps. I found some other resources:

    wiki.52north.org/.../ResolveMergeConflictsInGitEclipse

    wiki.eclipse.org/.../User_Guide

    John