Difference between revisions of "Power User Tools"
From PHYSpedia
(→Managing configs with vcsh and mr) |
(→Managing configs with vcsh and mr) |
||
Line 4: | Line 4: | ||
It solves the problem of having to use symlinks, and is a very nice tool. It works well with another tool named <code>mr</code> [https://github.com/joeyh/myrepos] that allows | It solves the problem of having to use symlinks, and is a very nice tool. It works well with another tool named <code>mr</code> [https://github.com/joeyh/myrepos] that allows | ||
you to synchronize all of your config repos with a single command. | you to synchronize all of your config repos with a single command. | ||
+ | |||
+ | ==Common Tasks== | ||
+ | |||
+ | ===Adding new repo=== | ||
+ | |||
+ | Let say you want to add a repo for tracking your zsh configuration. | ||
+ | First, create a gitignore file for the repo so you can just do <code>git add .</code> | ||
+ | |||
+ | > vim ~/.gitignore.d/zsh | ||
+ | ... | ||
+ | |||
+ | Add the following lines | ||
+ | |||
+ | /* | ||
+ | !/.zsh | ||
+ | |||
+ | |||
+ | Now create the repository and push to a remote | ||
+ | |||
+ | > vcsh init zsh # create the repo | ||
+ | > vcsh zsh add . # add all files not masked by ~/.gitignore.d/zsh | ||
+ | > vcsh zsh commit # commit files | ||
+ | > vcsh zsh remote add origin ssh://user@host/repo/with/write/access # create remote repo | ||
+ | > vcsh zsh push --set-upstream origin master # push to the origin and setup tracking |
Revision as of 09:39, 3 July 2015
Managing configs with vcsh
and mr
vcsh
[1] is a utility that allows you to create multiple git repositories to store configuration files in your home directory.
It solves the problem of having to use symlinks, and is a very nice tool. It works well with another tool named mr
[2] that allows
you to synchronize all of your config repos with a single command.
Common Tasks
Adding new repo
Let say you want to add a repo for tracking your zsh configuration.
First, create a gitignore file for the repo so you can just do git add .
> vim ~/.gitignore.d/zsh ...
Add the following lines
/* !/.zsh
Now create the repository and push to a remote
> vcsh init zsh # create the repo > vcsh zsh add . # add all files not masked by ~/.gitignore.d/zsh > vcsh zsh commit # commit files > vcsh zsh remote add origin ssh://user@host/repo/with/write/access # create remote repo > vcsh zsh push --set-upstream origin master # push to the origin and setup tracking