diff options
| author | srdusr <[email protected]> | 2022-12-12 23:54:58 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2022-12-12 23:54:58 +0200 |
| commit | ed6959a658f1040b5a93a626a93330d7b3e7ac8a (patch) | |
| tree | d37e404e43237e3063f86efa0231196e4df515cb /tools | |
| parent | fb6864440d2727563adad623ed782b442f56ab60 (diff) | |
| download | notes-ed6959a658f1040b5a93a626a93330d7b3e7ac8a.tar.gz notes-ed6959a658f1040b5a93a626a93330d7b3e7ac8a.zip | |
Fixed indent formatting
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/git.md | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/tools/git.md b/tools/git.md index dd117ac..c3a9e65 100644 --- a/tools/git.md +++ b/tools/git.md @@ -1,51 +1,51 @@ ### Dotfiles - Creating a dotfile git repo -1. Intialize git and create a folder named ~/.cfg -```bash -git init --bare $HOME/.cfg -``` -2. Put this in your .bashrc or .zsh to use `config` as a dotfiles alias. -```bash - alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' -``` - -3. Make sure to ignore the folder we're going use to clone. -```bash -echo ".cfg" >> .gitignore -``` -4. Set flag to not show untracked files -```bash -config config --local status.showUntrackedFiles no -``` -5. Replacing git with our newly created config alias we can version control our - dotfiles. -```bash -config status -config add .bashrc -config commit -m "Added bashrc" -config push -``` + 1. Intialize git and create a folder named ~/.cfg + ```bash + git init --bare $HOME/.cfg + ``` + 2. Put this in your .bashrc or .zsh to use `config` as a dotfiles alias. + ```bash + alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' + ``` + + 3. Make sure to ignore the folder we're going use to clone. + ```bash + echo ".cfg" >> .gitignore + ``` + 4. Set flag to not show untracked files + ```bash + config config --local status.showUntrackedFiles no + ``` + 5. Replacing git with our newly created config alias we can version control our + dotfiles. + ```bash + config status + config add .bashrc + config commit -m "Added bashrc" + config push + ``` - Installing onto a new system -1. Avoid weird behaviour/recursion issues when .cfg tries to track itself -```bash -echo ".cfg" >> .gitignore -``` -2. Clone the repo -```bash -git clone <remote-git-repo-url> $HOME/.cfg -``` -3. Set up the alias 'config' -```bash -alias config='/usr/bin/git --git-dir=<path to .cfg’s Git directory> --work-tree=$HOME' -``` -4. Set local configuration into .cfg to ignore untracked files -```bash -config config --local status.showUntrackedFiles no -``` -5. Checkout -```bash -config checkout -``` + 1. Avoid weird behaviour/recursion issues when .cfg tries to track itself + ```bash + echo ".cfg" >> .gitignore + ``` + 2. Clone the repo + ```bash + git clone <remote-git-repo-url> $HOME/.cfg + ``` + 3. Set up the alias 'config' + ```bash + alias config='/usr/bin/git --git-dir=<path to .cfg’s Git directory> --work-tree=$HOME' + ``` + 4. Set local configuration into .cfg to ignore untracked files + ```bash + config config --local status.showUntrackedFiles no + ``` + 5. Checkout + ```bash + config checkout + ``` config submodule add https://github.com/user/repo.git .path/to/repo |