srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2022-12-19 21:48:35 +0200
committersrdusr <[email protected]>2022-12-19 21:48:35 +0200
commit6244fb980518d9c67b631a445faf99526b3f0b41 (patch)
treef1d73db3f2dd3dd8dcf93cdac7112883d800b456 /tools
parent8cb66dae0b0d85a2a87c8bde35a19ad4e504b050 (diff)
downloadnotes-6244fb980518d9c67b631a445faf99526b3f0b41.tar.gz
notes-6244fb980518d9c67b631a445faf99526b3f0b41.zip
Aliases for git subtree
Diffstat (limited to 'tools')
-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