Skip to content

Generic tools and instructions for making it easier to work with git as a team.

Notifications You must be signed in to change notification settings

kevindavus/gitplus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

gitplus

Generic tools and instructions for making it easier to work with git. Clone this repo somewhere on your machine.

Good links:

Custom commands

To use these, you need to add them to your $PATH. Add something like this to your ~/.profile or ~/.bash_profile or whatever:

export PATH=$PATH:<path/to/gitplus>/commands

Once added, you'll probably need to source your profile file or start a new terminal window. Then you'll have access to the following commands.

git plus

Run git plus upgrade to easily pull the latest of this repo's origin/master branch to your machine.

git plus help will cat the contents of this README

git start

Sort of like "flow start ", but slightly different just to be confusing.

Starts a type/name branch, usually a feature or hotfix, and starts from the correct starting branch for you.

# start a hotfix (off of master by default)
$ git start hotfix FAD-1234

# start a feature (off of develop by default)
$ git start feature FAD-1234

# start whateveryouwant off of a specified branch
$ git start whatever FAD-1234 master

git finish

Does a --no-ff merge to master (if hotfix) and develop. Will also work in repos that don't have a develop branch by merging to master by default.

Specify "push" as the last argument to auto-push merged branch(es).

# Merge hotfix/FAD-1234 to master and develop
$ git finish

# Merge feature/FAD-1234 to develop only
$ git finish

# Merge feature or hotfix and push merged branch(es) to origin
$ git finish push

# Merge whatever/FAD-1234 to master and develop (specify type is hotfix)
$ git finish hotfix

# Merge other branch and push merged branch(es) to origin
$ git finish hotfix push

git promote

Merges develop into master locally, using a --no-ff merge to create an explicit merge commit.

Specify "push" as the last argument to auto-push master after merge.

# Merge develop to master
$ git promote

# Also push master to origin
$ git promote push

git update

Merges master or develop into your current branch depending on your branch type and if there is a develop branch available. It will also merge master into develop if on the develop branch.

Specify "rebase" to rebase the changes rather than merge them.

# Merge develop or master into your branch
$ git update

# Rebase develop or master into your branch
$ git update rebase

git in

List commits on your current branch in the origin remote that aren't present locally.

$ git in

git out

List commits on your current branch locally that are not in the origin remote.

$ git out

git heads

lol nah jk

git open

Opens the current GitHub repo in your browser. No auth required because the browser does auth for you.

Specify "current" as the last argument to open to current branch within repo.

# Open repo to master
$ git open

# Open repo to current branch
$ git open current

git upload

Pushes the current branch to remote branch of same name git push -u origin feature/FAD-1234

# push to remote
$ git upload

About

Generic tools and instructions for making it easier to work with git as a team.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%