Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manage own fork of Vim plugins with Vundle

I use Vundle as plug-in manager in Vim and it happens that I want to make modifications to some plug-in to correct bugs or to implement personal changes.

What I do in general is

  1. fork the original repo
  2. edit the .vimrc file and change the line Plugin 'original-repo' to Plugin 'my-fork', run :so % and then :PluginInstall
  3. make changes and commit
  4. push to my fork
  5. send a PR

At this point the PR can be accepter or rejected. In the former case, everything's ok. What about the latter case?

What I mean is that in general I can decide to keep the unaccepted edit in my fork (I've just committed it, after all), as well as in the local branch (that is, I keep Plugin 'my-fork' in my .vimrc file), since I consider this edit to be important to me, for some reason. On the other hand, I don't want my fork to get old just because I diverged by one or a few commits; that is, I still want to have my fork include new commits of the original repo. In addition, I want to be still able to send PR of other commits I can do, paying attention to the PR best practice of sending PRs from a synced fork.

I can imagine what the tools are fit for purpose, i.e.

  • the web for creating the fork and send PRs
  • git to manage different branches of the local fork
  • Vundle to manage Vim plugins

which I'm already using.

So the question is: what is the workflow I should follow to manage Vim plugins to which I can possibly participate with PRs of commits (and I obviously can't know in advance which PRs are accepted and which are rejected)?

like image 377
Enlico Avatar asked Oct 20 '25 17:10

Enlico


1 Answers

GitHub as whole guide devoted to working with forks.

In short:

  1. you define a new remote repository that points to the original,
  2. you fetch and merge from that "upstream" remote repository to keep your repository in sync.
like image 173
romainl Avatar answered Oct 23 '25 07:10

romainl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!