1

I am having a problem with git merge / rebase and even stash, let me explain what is happening:

Situation: I and other friend, we are working in separate branches, but we have a file that we always modify (messages.properties). Who finishes the work first, commit and push and the other make a fetch, stash his work, merge the branch with the branch´s friend and apply the stash ... here we always have a problem, because my messages.properties override his messages, and his modifications are lost.

The situation above happens even when I commit my work (instead of stash) and rebase /merge with his work; my messages always override his modifications.

I don´t know what I am doing wrong here, someone can help me?

9
  • What is this file good for? Sure, that it should be versioned?
    – KingCrunch
    Commented Dec 14, 2012 at 13:11
  • what commands are you using to achieve the workflow you mention? Maybe the issue lies in the exact commands used.
    – D-Rock
    Commented Dec 14, 2012 at 13:14
  • @KingCrunch This file is for internationalization! Commented Dec 14, 2012 at 13:18
  • 1
    @DiegoGusava What I (previously) wanted to say: For some configuration files (or similar) it is best practice to not commit the concrete file, but a template like messages.properties.dist. When you setup your workspace you copy the file to messages.properties and edit it regarding your (local) needs. However, like already mentioned it seems that this isn't appropiate here.
    – KingCrunch
    Commented Dec 14, 2012 at 13:27
  • 1
    Isn't there some log where you can see what eGit is actually doing under the hood? Commented Dec 14, 2012 at 13:48

1 Answer 1

0

Do this from the command line. You can see what changed with git log -p --graph --all -- path/to/messages.properties

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.