An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# subtree-scripts
Scripts to add, remove and update subtrees inside a repository.

![logo.png](logo.png)

##### 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