How to keep your init files on GitHub

I puzzled over this for a little while before figuring out a good approach: create a hard link from your .vimrc, .bashrc, etc. to a repo for all of your inits (mine is InitFiles: https://github.com/gcallah/InitFiles). Then check in these hard-linked files.

You will have to recreate the hard links on every machine you want to update from this repo.

But then, that's it! You edit your init files on the machine you are on, push the changes to the repo, and then pull the changes down to your other machines. Your /home/yourname/.bashrc simply is the same file as InitFiles/.bashrc, and you are good to go!

No comments:

Post a Comment