diff options
| author | srdusr <[email protected]> | 2022-12-19 21:48:35 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2022-12-19 21:48:35 +0200 |
| commit | 6244fb980518d9c67b631a445faf99526b3f0b41 (patch) | |
| tree | f1d73db3f2dd3dd8dcf93cdac7112883d800b456 /tools | |
| parent | 8cb66dae0b0d85a2a87c8bde35a19ad4e504b050 (diff) | |
| download | notes-6244fb980518d9c67b631a445faf99526b3f0b41.tar.gz notes-6244fb980518d9c67b631a445faf99526b3f0b41.zip | |
Aliases for git subtree
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/git.md | 9 |
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 |