Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (70 sloc) 2.63 KB

home

All my *nix home versioned, not only dotfiles

Table of Contents

Requirements

Requires bash, curl, git and vim. Depending on your OS, launch with root privilegies

  • On Centos : yum install -y bash curl git vim
  • On Ubuntu : apt-get install -y bash curl git vim
  • On OS X, requirements are already installed

Installation

All you need is a one-liner, it takes few seconds

curl -L https://g14n.info/home/init.sh | bash

Troubleshooting

If you are behind a firewall, try setting HTTPS_PROXY variable. If https scheme does not work, do not try with http scheme cause is not supported by home.

Optional

git remote rm my
git remote add my git@github.com:fibo/home.git

The repo remote set in the init.sh is a generic one, which can be used by anybody, but it doesn't let you to do git push my home to update remote with modifications.

Branches

branch description
master contains only this README.md file
gh-pages contains the init.sh used in the one-liner installation
home everything else, except README.md, to avoid showing it in your $HOME dir

How to

Add files and folders

Everything inside $HOME is ignored, so to add a file or a folder, for instance .vimrc, you need to modify .gitignore once

echo '!.vimrc' >> .gitignore
git add .
git commit -m 'added .vimrc'
git push my home

Add submodule

git submodule add -f https://github.com/foo/bar.git ~/path/to/foo/bar

Update all submodules

Copy and paste the following commands

cd
git pull my home
git submodule foreach git pull origin master
git commit -am ':arrow_up: updated submodules'
git push my home
# You are done!

Update to latest version

Copy and paste the following commands

cd
git pull my home
git submodule foreach git pull origin master
# You are done!