Good evening,
I found a github project that has a significant codebase that gets me 75% of the way to what I would like to do. It is relatively new (i.e. it will probably see frequent updates) and I would like to take it in my own direction.
I am fairly new to git…. is there any easy way to keep myself up to date with the github master, while at the same time straying away in my own direction?
i.e. If I keep my local master in sync with the github repo (git pull –ff-only upstream master), and work on my own branch, is there an easy command where I can easily apply all of my commits to an updated master branch, keeping the two separate?
(I’m sure this is a relatively simple operation for someone knowledgable in git!)
Thanks!
You want to use git rebase, which will move all the commits on your branch so they are based off an updated master branch.
After updating master from upstream as in the question, you do
git rebase master my-branch
Now it is as if my-branch was made from the most up-to-date master commit.