If you're improving the plugin, the best solution might be to propose your patch to the owner of the original repo.
If you can't or don't want to do it, you could either keep it in a dev branch or in your master
. It won't make any difference: either way you'll have to do a merge between your branch and origin/master
every time you'll want to retrieve update from upstream.
Example: let's assume you want to keep it on your local master
branch. Then you would have:
A ----------------- B
L origin/master L master
where B
is the commit you made with your modifications.
When you want to retrieve updates from upstream, using git fetch origin
, you would end up with:
---- B
/ L master
/
A -- C -- D
L origin/master
Then you'd just need to do, from your master
branch: git merge origin/master
, in order to get a commit with both your modifications and the updates
---- B -- E
/ /L master
/ /
A -- C -- D
L origin/master
As we can see, it would be easier if your changes could be accepted upstream. Not only could anyone benefit from it; it would also be much easier for you.