GIT: merging two branches using netbeans

I have two branches created in Bitbucket , one called master and the other called modulo-contratos .

The fact is that the second branch has changes in some files that I need to integrate into master , but when I do a merge using Netbeans , it replaces my newest files in master with the old ones from the modulo contratos branch.

What can I do?

+4
source share
1 answer

For git, files from modulo-contratos should look β€œnewer” than files in master . You probably edited them in the modulo-contratos branch after upgrading to master .

You have several options:

  • Try checking modulo-contratos and combining with master (and not vice versa). This may give better results.

  • Create a patch using the modulo-contratos branch and apply it to master . After that, merge and return all the changed files, replacing them with the version that you had before. This way, the master branch will be clean, and the β€œtimestamps” will be reset for the next round (so this will not happen again).

+3
source

Source: https://habr.com/ru/post/1396240/


All Articles