Skip to content

Files

Latest commit

8e02627 · Aug 24, 2024

History

History

git-publish

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 21, 2022
Aug 24, 2024

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: