Created
March 17, 2014 03:12
-
-
Save gabebw/9593348 to your computer and use it in GitHub Desktop.
GIT PUSH GIT PAID dot com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this inside a git repo. | |
# Change name of `origin` remote to `git` | |
sed -i '' 's/remote "origin"/remote "git"/' .git/config | |
# Pushing to `paid` means pushing to `master` | |
# http://stackoverflow.com/questions/549920/is-it-possible-to-alias-a-branch-in-git | |
git symbolic-ref refs/heads/paid refs/heads/master | |
# Now `git push git paid` == `git push origin master` | |
echo 'Try `git push git paid` (only works in this repo)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment