Hi @toddrjohnson,
I don’t know if this a good approach to you but you can create a script to update your repository for you on the master branch while you work on your branch.
Just as example:
you can make the following assuming you are working in your branch, and in a LINUX machine:
1-Here I ask for the last HASH commit from the LOCAL master branch
echo $(git log master -n 1 --pretty=%H)
2-Here I ask to receive the news from the origin/master this does not merge anything, but let any new code it in standby on memory:
git fetch
3-Here I ask the last HASH commit from the REMOTE origin/master branch to compare the hash later:
echo $(git log origin/master -n 1 --pretty=%H)
4-Now the comparison:
- If the numbers aren’t different then you don’t need to worry because your local master and remote origin/master are in sync,
- If the number are different, jump to the master branch don’t forgetting to commit any un-commited at first and merge the new code in standby:
git checkout master
git merge FETCH_HEAD
This will merge all the new code received that was in standby.
Now just using git diff "custom branch" "master branch"
to differentiate the local custom branch to the local updated master branch.
Now its up to you how you like to do that.
I prefer create a separated branch to my work, and every time I need to merge something I create a new temporary branch FROM my custom branch for the sake of the merging so I let apart and safe the master and the custom branches and use the temporary branch as a table to merge things.
After merging successfully it will be already prepared to merge with my custom branch because my temp branch was based in mine custom branch.
That way I can leave the master untouched and accumulating changes from the remote source.
You can put all this thing on a shell script easily :
#!/bin/bash -e
cd "your fast ai folder"
GITLOG_LOCAL=$(git log master -n 1 --pretty=%H)
git fetch
GITLOG_REMOTE=$(git log origin/master -n 1 --pretty=%H)
if [[ "$GITLOG_LOCAL" != "$GITLOG_REMOTE" ]];then
git checkout master
git merge FETCH_HEAD
fi
Every time I execute this piece of code I just update the master branch on my computer comparing first if it has something new before that. Then I can make decisions if I can merge things unmerged there or if I stash it first … You can use this code and modify it.
Other interesting thing is comparing. Once I am on the temporary branch (based in my custom branch) I can compare just how much commits rest to my temporary branch get updated to the master branch by:
git log ..FETCH_HEAD
So I can check each commit individually and individually pick each one to merge:
git cherry-pick "commit-hash"
As I said once I check everything and picked the interested commits i can just merge all this definitely to my custom branch.
I hope my process can give you some new ideias.