You are not logged in.

#1 2009-12-05 05:20:54

choogi
Member
Registered: 2009-10-06
Posts: 60

[SOLVED] GIT to manage vim scripts

I'd like to start managing my config files using GIT to keep settings in sync between machines that I use.  I'm trying to start by creating a GIT repo for my vim scripts.

I've started playing around with it a little bit but what I'm most interested in being able to do is uninstall any arbitrary vim script at any point in time to remove all the files that were added with it.  For example, if I installed some script a long time ago, but recently discover a new script whose functionality is much better, I'd like to be able to use git to remove all the files that were installed with the old script and then add the files for the new script.  I thought I could get this kind of behavior by putting each script in its own branch but the problem then is that the scripts installed in one branch won't be available when in another branch.

I know that vimballs make the uninstalling process fairly easy but I'd like a more general solution for all of my config files.  Does anyone know of a better way to do this?

Last edited by choogi (2009-12-05 15:27:45)

Offline

#2 2009-12-05 12:22:48

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: [SOLVED] GIT to manage vim scripts

Well, if you make sure you ensure that 1 commit = one "package" of
scripts/files (i.e., so long as you don't add 15 unrelated scripts in
a single commit), then you could just use "git revert" to undo the
commit that added the package/script you don't want any more. See man
git-revert.

Offline

#3 2009-12-05 12:41:27

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: [SOLVED] GIT to manage vim scripts

You could use submodules.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2009-12-05 15:27:36

choogi
Member
Registered: 2009-10-06
Posts: 60

Re: [SOLVED] GIT to manage vim scripts

Ahh okay git revert does it.  Thanks!

Offline

Board footer

Powered by FluxBB