srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/git.md
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2022-11-25 23:41:41 +0200
committersrdusr <[email protected]>2022-11-25 23:41:41 +0200
commit55e0ec19b1255aeebf3653c8bc703168038967b2 (patch)
tree9d27dbeee56f00123233051c6efd63f3996f2beb /tools/git.md
parentc249c6e15f652eb0106227b8241920fc8b914309 (diff)
downloadnotes-55e0ec19b1255aeebf3653c8bc703168038967b2.tar.gz
notes-55e0ec19b1255aeebf3653c8bc703168038967b2.zip
Dotfiles integration
Diffstat (limited to 'tools/git.md')
-rw-r--r--tools/git.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/git.md b/tools/git.md
index e69de29..6b9b6f1 100644
--- a/tools/git.md
+++ b/tools/git.md
@@ -0,0 +1,29 @@
+## Dotfiles
+- Intialize git and create a folder named ~/.cfg
+```bash
+git init --bare $HOME/.cfg
+```
+- 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'
+```
+
+- Make sure to ignore the folder we're going use to clone.
+```bash
+echo ".cfg" >> .gitignore
+```
+- Set flag to not show untracked files
+```bash
+config config --local status.showUntrackedFiles no
+```
+- 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
+```
+config submodule add https://github.com/user/repo.git .path/to/repo
+
+config submodule update --remote --merge