https://github.com/franciscoknebel/subtree-scripts
Scripts for simplifying adding, removing and updating repository subtrees.
https://github.com/franciscoknebel/subtree-scripts
git scripts subtree subtree-scripts
Last synced: about 1 month ago
JSON representation
Scripts for simplifying adding, removing and updating repository subtrees.
- Host: GitHub
- URL: https://github.com/franciscoknebel/subtree-scripts
- Owner: FranciscoKnebel
- License: mit
- Created: 2017-06-18T05:22:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T14:34:36.000Z (almost 8 years ago)
- Last Synced: 2025-02-16T19:44:59.338Z (over 1 year ago)
- Topics: git, scripts, subtree, subtree-scripts
- Language: Shell
- Homepage:
- Size: 77.1 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# subtree-scripts
Scripts to add, remove and update subtrees inside a repository.

##### Created using git subtree
https://developer.atlassian.com/blog/2015/05/the-power-of-git-subtree/
## Getting Started
Clone the repository to your local machine and update your `.gitconfig` file with the configuration provided on the next step.
### Prerequisites
- Git.
### Installing
After you clone the repository, copy the full path to the `scripts` directory.
###### $HOME/.gitconfig
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.
### Usage
##### ADD repository folder
```
git sba
```
##### REMOVE repository folder
```
git sbr
```
##### UPDATE repository folder
```
git sbu
```
##### UPDATE ALL repository folder
```
git sbua
```
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/franciscoknebel/subtree-scripts/tags).
## Authors
* **Francisco Knebel** - *Initial work* - [Francisco Knebel](https://github.com/FranciscoKnebel)
See also the list of [contributors](https://github.com/FranciscoKnebel/subtree-scripts/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details