0

I have a partner working with me, my workstation is Linux and my partner's workstation is Windows. We write codes in different module, but sometimes my new updated file maybe cover by his older version file. I'm sure that he didn't modify my file.

For example:

  1. I commit a file t1.txt and merge to master at 9:00 AM;
  2. He checkout a branch from master at 9:05 AM;
  3. I update file t1.txt and merge to master at 10:00 AM;
  4. He add a file t2.txt and merge his branch ad 10:30 AM, but the old version t1.txt (step 1) will convert my newer version (step 3).

What's the problem?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
andrefun
  • 79
  • 6
  • Have either of you pulled? – Makoto Jan 04 '16 at 02:44
  • Yes, both of us pulled. But why no modified file would be commited? – andrefun Jan 04 '16 at 02:53
  • 2
    What does `git log --graph --oneline --decorate` show for both of you? Do both of your histories line up? – Makoto Jan 04 '16 at 02:56
  • 1
    What you describe sounds like your partner _didn't_ pull after **3**, and then did something along the lines of a `push -f` (not a merge) after **4**. @Makoto is right: You need to look at the history because actual merges won't result in this situation. Of course after I say this I'm assuming you're talking about in a central repository: If you're talking about the state of _his_ repository than the issue is just that he didn't `pull` **3**. – Guildencrantz Jan 04 '16 at 04:10
  • The problem is My partner did not pull on his working branch, but on the local master branch. – andrefun Jan 04 '16 at 05:59

0 Answers0