Skip to content

Latest commit

 

History

History

git-publish

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

git publish

Publish the current branch

Git alias:

publish = "!f() { git push --set-upstream ${1:-origin} $(git current-branch); }; f"

Publish the current branch by pushing to the remote specified by the first argument (defaulting to origin), and setting the current branch to track the upstream branch.

Example:

# pushing to origin
git publish

# pushing to fork
git publish fork

Compare: