summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJulian <julianteule@gmail.com>2017-02-08 22:20:47 +0100
committerJulian <julianteule@gmail.com>2017-02-08 22:20:47 +0100
commitecf4878084e1d2fe352e923d4f4f534dcde37869 (patch)
treee84442abf973d47db64f86ae0db84bdb5ae13919 /README.md
parent4bbbe4724c5260ce6e0e9001aeca7c59236dce3a (diff)
parent82ec37bdf8307b14e31a52d57b74b3471b1367ad (diff)
Removed irritation error from conky, and fixed merge conflicts
Diffstat (limited to 'README.md')
-rw-r--r--README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md
index 895d550..2cd65dd 100644
--- a/README.md
+++ b/README.md
@@ -6,3 +6,48 @@ This is where i keep my dotfiles and scripts.
I use [this](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/) method of managing dotfiles
+If the link above is broken, here is a short summary.
+
+The method comes from this [thread](https://news.ycombinator.com/item?id=11070797). The idea is to transform your home folder into a git repository, and then add the files you edited.
+
+### First time setup
+
+Make a new bare github repository
+
+Initialize git
+
+`git init --bare $HOME/.cfg`
+
+Add the easy to use alias
+
+`alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'`
+
+Set git option
+
+`config config --local status.showUntrackedFiles no`
+
+This is important, because othervise git vil print every file in your home directory.
+
+Remember to add `alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'` to your shellrc
+
+Now commands like `config add`, `config commit`, `config push` and `config pull` can be used to manage and sync you config files to github.
+
+### Add to new computer
+
+Configure the alias
+
+`alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'`
+
+Make gitignore
+`echo ".cfg" >> .gitignore`
+
+Clone repository
+`git clone --bare <git-repo-url> $HOME/.cfg`
+
+Checkout
+`config checkout`
+
+Backup or delete files that conflict this command and then run `config checkout` again
+
+And turn off the tracking
+`config config --local status.showUntrackedFiles no`