How do I use version control to make my own modifications to non vcs-ed stuff?
Suppose I download a .vim script from somewhere that just comes "raw", it isn't in a repository anywhere.
Now I want to make a few tweaks. But when the original author releases a new version, I'd like to easily keep my change开发者_Python百科s in there, assuming no conflicts, and if there are conflicts I'd like to know.
I am familiar with using git and svn in very simple ways, and I understand how to create my own repos if needed.
What I am really interested to know is what procedure would you go through to handle this situation? I'm sure it's come up for you before :)
Grab the current version from the original author.
Stick it in your version control system.
Create a branch called "vendor"
Make you own edits on the trunk, committing as you go.
When you find a new version from the original author, check out the "vendor" branch, overwrite the file(s), and commit.
Merge the vendor branch to trunk and commit.
精彩评论