A smart git-subtree tool that just works.
Gsub enhances git-subtree by storing a configuration file containing alias, prefix and remote.
add Adds a subtree alias
list Lists currently managed subtrees
remove Removes a subtree alias
pull Pulls from a subtree alias
push Pushes to a subtree alias
rename Renames an alias
USAGE:
Normal scenario:
gsub add --alias remote1 --prefix remote1/src --ref master --squash --url https://github.com/remote1
-a, --alias Required. Alias to use for subtree
-p, --prefix Required. Prefix path to subtree
-u, --url Required. Remote URL of subtree
-r, --ref Required. Ref like master
-s, --squash Squash commits
Adds a subtree alias to the repo. Future operations can then access it by referencing the alias.
USAGE:
Normal scenario:
gsub remove --alias remote1
-a, --alias Required. Alias to subtree
-v, --verbose Increase verbose output
Removes an alias from the configuration file.
USAGE:
Normal scenario:
gsub rename --from remote1 --to remote2
-f, --from Required. Original alias name
-t, --to Required. New alias name
Renames an alias.
USAGE:
Normal scenario:
gsub list
-v, --verbose Increase verbose output
Lists all aliases stored for this repo.
USAGE:
Normal scenario:
gsub pull --alias remote1 --ref develop --squash
-a, --alias Required. Alias to subtree
-r, --ref Alternative ref, other than the one used when added
-s, --squash Squash commits
-v, --verbose Increase verbose output
Pulls changes from an alias. Optional ref to override default branch.
USAGE:
Normal scenario:
gsub push --alias remote1 --ref develop --squash
-a, --alias Required. Alias to subtree
-r, --ref Alternative ref, other than the one used when added
-s, --squash Squash commits
-v, --verbose Increase verbose output
Pushes changes to an alias. Optional ref to override default branch.
Requires .NET Standard 2.0 (preview)
cd gsub
dotnet run --project gsub\gsub.csproj
cd gsub
dotnet restore
dotnet publish -c release -r "win10-x64"
cd gsub
dotnet restore
dotnet publish -c release -r ubuntu.16.10-x64 -o ~/gsubpub/
cd gsub
dotnet restore
dotnet publish -c release -r "centos.7-x64" -o ~/gsubpub/
cd gsub
dotnet restore
dotnet publish -c release -r osx.10.11-x64 -o ~/gsubpub/
Rename aliases. This can manually be done by editing the configuration file without any side-effects.- merge --commit [hash]
- split --prefix dir --to repo [--commit [hash]]
- add --commit [hash]
- diff between local and remote