Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 349 Bytes

009-git-publish-alias.md

File metadata and controls

11 lines (8 loc) · 349 Bytes

A small git alias that's a big timesaver, just add the following to your .gitconfig file

[alias]
        branch-name = "!git rev-parse --abbrev-ref HEAD"
        publish = "!git push -u origin $(git branch-name)"

Then pushing the current branch to origin is just a git publish away.

hat tip: https://gist.github.com/robmiller/6018582