-
Notifications
You must be signed in to change notification settings - Fork 2
Tutorials
In the installation section, you added a homeshick
alias to your .bashrc
file (substitute .cshrc
for .bashrc
if you are a csh or tcsh user).
Let's create your first castle to hold this file. You use the [[generate|Commands#generate]]
command to do that:
homeshick generate dotfiles
. This creates an empty castle, which you can now populate.
Put the .bashrc
file into your dotfiles
castle with homeshick track dotfiles .bashrc
.
Assuming you have a repository at the other end, let's now enter the castle, commit the changes, add your github remote and push to it.
homeshick cd dotfiles
git commit -m "Initial commit, add .bashrc"
git remote add origin git@github.com:username/dotfiles.git
git push -u origin master
cd -
Note: The .homesick/
folder is not a typo, it is named as such because of compatibility with
homesick, the ruby tool that inspired homeshick
To get your custom .bashrc
file onto other machines you install homeshick and
[[clone|Commands#clone]]
your castle with: $HOME/.homesick/repos/homeshick/bin/homeshick clone username/dotfiles
homeshick will ask you immediately whether you want to symlink the newly cloned castle.
If you agree to that and also agree to it overwriting the existing .bashrc
you can run
source $HOME/.bashrc
to get your homeshick
alias running.
You can run [[check|Commands#check]]
to see whether your castles are up to date or need pushing/pulling.
This is a task that is easy to forget, which is why homeshick has the [[refresh|Commands#refresh]]
subcommand.
It examines your castles to see when they were pulled the last time and prompts you to pull
any castles that have not been pulled over the last week.
You can put this into your .bashrc
file to run the check everytime you start up the shell:
printf '\nhomeshick --quiet refresh' >> $HOME/.bashrc
.
(The --quiet
flag makes sure your terminal is not spammed with status info on every startup)
If you prefer to update your dotfiles every other day, simply run homeshick refresh 2
instead.
To make changes to one of your castles you simply use git.
For example, if you want to update your dotfiles
castle
on a machine where you have a nice tmux configuration:
homeshick track dotfiles .tmux.conf
homeshick cd dotfiles
git commit -m "Added awesome tmux configuration"
git push origin master
cd -