So, for example, I don't use vim anymore
This example will get you banned on this forum. Careful there
Anyway, nice workflow, thank you!
This workflow sounds much more convenient, thanks for sharing!
So, just to make sure I got it right: you have a separate folder just for dotfiles which is actually in your git repo or some other cvs, and your local actual config files are not tracked?
Right. Basically:
$ cd ~
$ mkdir dotfiles
$ cd dotfiles
$ git init
$ mkdir bash
$ mv ../{.bashrc,.bash_profile} bash
$ git add bash
$ git commit
$ stow bash
...and so on.
I forgot to mention that it's also easy to clean up. Say you don't want the config files of a program anymore, you just do stow -D program to remove the symlinks.
]]>Another option, which I think more people do, is to store their config files under a separate directory and then use a tool to symlink those files back into their home directory. Then you only have to keep that specific config file directory under version control.
[...]
I then use Stow to create symlinks back into my home directory
[...]
This will spare you from having git worry about every file in your home directory.
This workflow sounds much more convenient, thanks for sharing!
So, just to make sure I got it right: you have a separate folder just for dotfiles which is actually in your git repo or some other cvs, and your local actual config files are not tracked?
[cra@hannelore 14:42:44 ~]
$ du -hs .git
364M .git
[cra@hannelore 14:42:50 ~]
$ du -hxd 0 .git
364M .git
[cra@hannelore 14:42:54 ~]
$ git gc
Counting objects: 86, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (79/79), done.
Writing objects: 100% (86/86), done.
Total 86 (delta 21), reused 0 (delta 0)
[cra@hannelore 14:42:57 ~]
$ du -hxd 0 .git
240M .git
[cra@hannelore 14:42:59 ~]
$ sync
[cra@hannelore 14:43:04 ~]
$ du -hxd 0 .git
240M .git
[cra@hannelore 14:43:05 ~]
$
Also 'git status' shows a lot of files I haven't added myself (??) as "new files" under "Changes to be commited".
And 'gitk --all' shows a fun entry "Local changes checked in to index but not committed". I'm puzzled %)
For example, I have a directory called dotfiles, and under it are directories for each program. Each program directory has all of its dotfiles laid out exactly as they would be laid out in my home directory. So, for example:
/home/brandon/dotfiles/
bash/
.bashrc
.bash_profile
newsbeuter/
.config/newsbeuter/urls
I keep the dotfiles directory under version control.
I then use Stow to create symlinks back into my home directory:
$ stow bash
$ stow newsbeuter
$ ls -l ~/.bash_rc
lrwxrwxrwx 1 brandon users 1K Nov 8 16:41 /home/brandon/.bashrc -> dotfiles/bash/.bashrc
When you set up a new system, you only need to stow the programs you actually need. So, for example, I don't use vim anymore but I still have my config files. If I ever decide to switch back, I just need to stow vim to have them back. Until then, they're tucked neatly away, not cluttering up my home directory.
This will spare you from having git worry about every file in your home directory.
]]>git gc
For me it shrank my .git size considerably:
$ du -hxd 0 .git
480K .git
$ git gc
Counting objects: 92, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (90/90), done.
Writing objects: 100% (92/92), done.
Total 92 (delta 41), reused 0 (delta 0)
$ sync
$ du -hxd 0 .git
112K .git
'man git-gc' for more information, options, etc.
]]>A while ago I had an idea to have my computer track my config files for me, so now I have a small repository for my configs which I store in git (and on bitbucket).
What I actually noticed that the ~/.git folder becomes bloated (right now it takes around 364 Mb, and on my laptop it was a few Gb actually.. For around a megabyte of text files)
Sooo.. I'm not a git guru, this behavior seems strange and I don't know how to fix that. Am I just doing something strange and using a wrong tool here?
]]>