Skip to content

MangoTwo2/gsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A smart git-subtree tool that just works.

Gsub enhances git-subtree by storing a configuration file containing alias, prefix and remote.

Verbs

  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

Parameters

add

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.

remove

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.

rename

USAGE:
Normal scenario:
  gsub rename --from remote1 --to remote2

  -f, --from       Required. Original alias name

  -t, --to         Required. New alias name

Renames an alias.

list

USAGE:
Normal scenario:
  gsub list

  -v, --verbose    Increase verbose output

Lists all aliases stored for this repo.

pull

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.

push

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.

Installation

Requires .NET Standard 2.0 (preview)

All platforms when dotnet is installed

cd gsub
dotnet run --project gsub\gsub.csproj

Windows

cd gsub
dotnet restore
dotnet publish -c release -r "win10-x64"

Ubuntu

cd gsub
dotnet restore
dotnet publish -c release -r ubuntu.16.10-x64 -o ~/gsubpub/

Redhat / CentOS

cd gsub
dotnet restore
dotnet publish -c release -r "centos.7-x64" -o ~/gsubpub/

MacOS

cd gsub
dotnet restore
dotnet publish -c release -r osx.10.11-x64 -o ~/gsubpub/

ToDo

  • 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

About

A smart git-subtree tool that just works.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages