We have third party software that changes about 3 or 4 times per year. The vendor's code obviously doesn't take our customizations into account and when their latest code (a single Pro*C file) is applied to our production system it wipes all of them out.
A coworker has suggested that we put this code into Git, and try to use its tools to manage the changes. To that end, we have done the following. I have created two branches in Git, the default master branch, and another one named "custom". In the custom branch the first version of the file is an unmodified point release from October of last year, and the second version of the file is with our customizations successfully applied and tested.
In the master branch, the first version is again the October release. The second is their (current) March release.
What steps do I need to take to apply the differences between the two custom branch versions to the master branch?
In subversion there were a few tutorials and examples available for what were called "vendor drops", but I'm not finding much on this scenario with Git. Definitely need to work on my Git skills.
This is so simple, svn would be completely embarrassed for even having a tutorial on this.
Let's look at your scenario in this graph:
A -- master
\
B -- custom
In this graph, A
is the original October release of the third party software. B
is the changes you have made.
Now there is a new March release of the third party software.
First, put the new version in the repository in branch master
:
$ git checkout master # go to master
$ cp -R ../march/* . # overwrite with new version
$ git add ???? # add any new files they might have added (check with `git status`)
$ git commit -a # make a new commit
I believe this step was quite obvious. So now you have the following graph:
A----C -- master
\
B -- custom
Where C
is the new commit, containing the March release.
This is now all you need to do:
$ git checkout custom # go to custom
$ git merge master # get the changes over
Done.
The graph is now:
A----C -- master
\ \
B----D -- custom