Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-upstream utility #375

Closed
rstacruz opened this issue May 21, 2015 · 1 comment · Fixed by #1080
Closed

set-upstream utility #375

rstacruz opened this issue May 21, 2015 · 1 comment · Fixed by #1080

Comments

@rstacruz
Copy link
Contributor

would anyone be interested in a utility that does this? i can make a PR if so.

#!/usr/bin/env sh
# git-pushup
#   Pushes the current branch via --set-upstream.
#   It's a shortcut for `git push --set-upstream origin <current branch>`.

remote=$1
[ -z $remote ] && remote=origin

git push --set-upstream $remote `git rev-parse --abbrev-ref HEAD`
@hemanth
Copy link
Collaborator

hemanth commented May 21, 2015

Go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants