Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamiewarb/myconf
My config files, predominantly dotfiles
https://github.com/jamiewarb/myconf
Last synced: 10 days ago
JSON representation
My config files, predominantly dotfiles
- Host: GitHub
- URL: https://github.com/jamiewarb/myconf
- Owner: Jamiewarb
- Created: 2017-11-16T17:27:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-22T09:25:44.000Z (about 4 years ago)
- Last Synced: 2024-11-07T03:46:58.843Z (about 2 months ago)
- Language: Shell
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# .myconf
This repo contains all of my configuration files. Credit to [StreakyCoba](https://news.ycombinator.com/item?id=11071754)
It does not contain any credentials, keys or sensitive data.
Remember to copy this over manually before wiping a machine!!
> Don't forget to copy all sensitive data over to a new machine!!
## Set up from scratch:
git init --bare $HOME/.myconf
alias myconf='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
myconf config status.showUntrackedFiles nowhere my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like:
myconf status
myconf add .ackrc
myconf commit -m "Add ackrc"
myconf add .zshrc
myconf commit -m "Add zshrc"
myconf push## Replicate on new machine
To replicate this home directory on a new machine using the following command:git clone --separate-git-dir=$HOME/.myconf [email protected]:jamiewarb/myconf $HOME
## Replicate with non-empty $HOME
If your $HOME is not empty, you should do the following instead, to a temporary directorygit clone --separate-git-dir=$HOME/.myconf [email protected]:jamiewarb/myconf $HOME/myconf-tmp
cp ~/myconf-tmp/.gitmodules ~ # If you use Git submodules
rm -r ~/myconf-tmp/
alias myconf='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
myconf config status.showUntrackedFiles no## Explanation
The first line creates a folder ~/.myconf which is a Git bare repository that will track our files.
Then we create an alias myconf which we will use instead of the regular git when we want to interact with our configuration repository.
We set a flag - local to the repository - to hide files we are not explicitly tracking yet. This is so that when you type myconf status and other commands later, files you are not interested in tracking will not show up as untracked.