Skip to content

Scripts for simplifying adding, removing and updating repository subtrees.

License

Notifications You must be signed in to change notification settings

FranciscoKnebel/subtree-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subtree-scripts

Scripts to add, remove and update subtrees inside a repository.

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 <repository uri> <destination folder>
REMOVE repository folder
git sbr <destination folder>
UPDATE repository folder
git sbu <repository uri> <destination folder>
UPDATE ALL repository folder
git sbua

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Scripts for simplifying adding, removing and updating repository subtrees.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages