0

So, the dev I am working with edited the files in the repository while he was on master branch, then I told him to switch to develop branch, he tried without stashing so it didn't allow him to do so due to commits. I told him to stash and he told me to that he couldn't, we had to release a hotfix so I told him to just manually download what I merged to master on gitlab in a different folder and to continue his work because we will sort it out later.

Now, I've done few more fixes and pushed to develop branch, if he pulls my changes, it will REPLACE his changes, and if he pushes his changes, it will REPLACE my changes, even if we merge, same thing.

Example: enter image description here

as you can see, it deleted his row.

What can I do, to bring his changes into the develop branch without losing any other changes..

Marky
  • 61
  • 1
  • 7

1 Answers1

-1

As far as my knowledge goes i don't think you can do much other than code compare. You can try to (git diff details & examples):

git diff --name-status --no-index <ur_folder_root> <naughty_developer> >> diff_file

The basic logic of git is to use branches as much as you can and commit as much as you can. Once you start branching so much that you forget the names of your branches you know you are on a good road! It will save you headaches.

Even thought that is my perspective on branches other developers will have other approaches. I don't really persist on a specific way of branching or commit, i am just saying you should use them instead of making sub sub sub sub project directories.

KALALEX
  • 430
  • 1
  • 5
  • 19