Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 588 Bytes

index.md

File metadata and controls

30 lines (19 loc) · 588 Bytes

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: