Github Merge conflicts on the same file - gouravtiwari/huddle-skeleton GitHub Wiki

**A scenario where two users are working on the same file, one user pushed changes on one file to github.

**Another user is now working on the same file.

**Note that if two users are working on the same file but on separate lines github will auto merge conflicts (example a change had been made on a line that does not exist in the current file it will add it to the file) when the user pulls before pushing.

**Suppose a user pulls and the file has been changed on the same line git will notify you to resolve conflicts before commits, if you go back to the file it would look like:

<<<<<<< HEAD

User1 is currently working here, now let me try something else


User1 is currently working here and User2 is also working here

>>>>>>> 81a8bca2ef16189471763af8ca3071a150f5e2f9

The line after the <<<<<<HEAD is the line you changed and the one below it is the change that was pushed on the same line. Resolve this conflict by moving your line or removing it. Save the file!

**Now git add , git commit -m “”, and git push.

⚠️ ** Fallback** ⚠️