diff options
| author | KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> | 2018-02-13 15:42:09 +0100 |
|---|---|---|
| committer | KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> | 2018-02-13 15:42:09 +0100 |
| commit | e885aeee35699910b4f08ece45c7c97110ffe41c (patch) | |
| tree | cda2bb390e9f1f2ea24221ff36c4e27675f15282 /README | |
| parent | 0a0448876da90426c17f3687e14d408bf9d2b4e0 (diff) | |
| download | dotfiles-e885aeee35699910b4f08ece45c7c97110ffe41c.tar.xz | |
Add usage notes
And simplify .gitignore. I originally added !/.* to make sure
committed dotfiles would still appear in git status, but that's not
necessary:
> Files already tracked by Git are not affected
> β gitignore(5)
The only downside is that to start tracking new dotfiles, git add will
need --force.
Diffstat (limited to 'README')
| -rw-r--r-- | README | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -1,4 +1,27 @@ -What's "dotfiles", precious? -What's "dotfiles" eh? +A few good dotfiles +=================== π Clone'em, tweak'em, stick'em in your $HOME π + +Usage notes +----------- + +Some Git sorcery to maximize usability and avoid brittle hacks +(e.g. symlinks, homebrewed synchronization scripts): + +``` sh +# In $HOME, prepare a Git repository: +$ git init + +# Grab history: +$ git remote add --fetch $cutename $url + +# Move to latest commit without actually touching files: +$ git reset $cutename/master + +# Checkout dotfiles that were not already in $HOME: +$ git checkout -- .gitignore # β¦ + +# Tell Git to forget about repository fluff: +$ git update-index --assumed-unchanged -- README # β¦ +``` |
