Scripts to add, remove and update subtrees inside a repository.
https://developer.atlassian.com/blog/2015/05/the-power-of-git-subtree/
Clone the repository to your local machine and update your .gitconfig
file with the configuration provided on the next step.
- Git.
After you clone the repository, copy the full path to the scripts
directory.
Add this configuration to your .gitconfig file.
path/to/scripts
should be set accordingly.
[alias]
# "subtree add"
sba = "!f() { ./path/to/scripts/add $1 $2; }; f"
# "subtree remove"
sbr = "!f() { ./path/to/scripts/remove $1; }; f"
# "subtree update"
sbu = "!f() { ./path/to/scripts/update $1 $2; }; f"
# "subtree update all"
sbua = "!f() { ./path/to/scripts/updateAll; }; f"
After you configure .gitconfig
, you can use the scripts as defined on the usage section.
git sba <repository uri> <destination folder>
git sbr <destination folder>
git sbu <repository uri> <destination folder>
git sbua
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Francisco Knebel - Initial work - Francisco Knebel
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details