How to merge Github codes?

Asked

Viewed 225 times

1

I downloaded a project from Github, then made some changes, another colleague of mine did the same thing with a single difference, he committed and updated the repository on Github. I needed to create a branch and merge and then I made a git pull origin master

STS showed me some incoherences, and it is possible to make comparisons of my changes to the code coming from the repository as you can see below.

inserir a descrição da imagem aqui

Please, I would like to know if there is any resource in STS to be able to merge the two codes?

  • is using which git plugin? Egit?

  • Please , how will I use this to merge the two codes?

  • 1

    In my experience working with git, when it merges and can’t resolve conflicts automatically, you should go "selecting" the chunk of valid code.

1 answer

0

It seems to me that he is already presenting a way to merge. You’ll have to merge the codes in the same hand, not always a smooth scroll merge, without having to select what goes to your main branch.

I particularly use meld to merge, it is good and IDE independent. If you choose meld or any other tool that merge, just set it in . gitconfig or even via command.

# set up Meld as the default gui diff tool
$ git config --global  diff.guitool meld

# set the path to Meld
$ git config --global mergetool.meld.path C:/meld-1.6.0/Bin/meld.sh

Then just use the command below for example:

git merge origin/master

I hope I’ve helped

Browser other questions tagged

You are not signed in. Login or sign up in order to post.