srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/git.md
diff options
context:
space:
mode:
Diffstat (limited to 'tools/git.md')
-rw-r--r--tools/git.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/git.md b/tools/git.md
index a632bad..a926b00 100644
--- a/tools/git.md
+++ b/tools/git.md
@@ -70,6 +70,15 @@ NOTE: use the `--squash` flag to omit storing of entire history of subproject in
```bash
$ config push
```
+ 5. Optional aliases to put into .gitconfig:
+ ```bash
+ [alias]
+ sba ="!f() { git subtree add --prefix $2 $1 main --squash; }; f"
+ sbu ="!f() { git subtree pull --prefix $2 $1 main --squash; }; f"
+ # Example:
+ $ config sbu https://github.com/srdusr/nvim.git .config/nvim
+ ```
+
- - -
## Basic commands