Apply source code updates after fork time and various changes

0

I have a situation in which we use a system that the code is open source, but we have made some modifications to fit our need.

Now the original system has undergone code changes to improve security, I'm looking at their commits and implementing changes to our system.

There is some tool, maybe even in git itself, where I could make a comparison, which in case I took the code of the day I gave the fork in their code, my current code and their current code and make a comparison , sort of returning a union code from the changes of mine and theirs?

    
asked by anonymous 18.08.2017 / 19:33

1 answer

1

First, you have to ensure that your git repository is an extension of the original project, that it is a fork and not just a copy. Even if you are copying, it is usually to come up with a folder called .git which contains the necessary information of what we call origin .

So, you will first need to add a remote pointing to the repository where the changes were made. You can see how it's done from the git site link

git remote add <name> <url>

After this, you will have a remote to perform all git functions as git fetch co_de git pull .

With this set up, you will use git checkout . According to the documentation:

  

Given one or more existing commits, apply the change each one introduces, recording a new commit for each. This requires your working tree to be clean (no modifications from the HEAD commit).

Accessing the documentation you can see exactly how to use the tool:

link

    
20.08.2017 / 21:56