0

I'm new to git . I can't find any answer to this simple question, have done a lot of research :

We are using a GIT bare redepository on a linux server .

Now let's suppose this :

  • Dev 1 Opens index.html
  • Dev 2 Opens index.html at the same time

  • Dev 1 modify and adds code during 1 day Then commit and push

  • Dev 2 modify and adds code during 5 days.

Dev 2 cannot push any more, because index.html is not the same on the redepository .

We don't want to use branches .

Is pushing the button MERGE on smartgit the right solution, then Git will calculate the diffrence and create a great index.html ?

Thank you a lot .

p.s : dev 1 uses smartgit on windows 7, dev 2 too, or eventually from the server.

jaja5000
  • 51
  • 8

2 Answers2

1

What you have to do is resolve merge conflicts

Have a look at this answer: How to resolve merge conflicts in Git

Nigel Nop
  • 180
  • 1
  • 6
0

Why you do not want to use branches? I think that you should start using them as it allows you to deal with problems like this without even noticing :)

You should first pull code which was already pushed by Dev1. Resolve local conflicts, commit changes and push to remote repo.

Wiciaq123
  • 486
  • 4
  • 13