Skip to content

Instantly share code, notes, and snippets.

@gabebw
Created March 17, 2014 03:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabebw/9593348 to your computer and use it in GitHub Desktop.
Save gabebw/9593348 to your computer and use it in GitHub Desktop.
GIT PUSH GIT PAID dot com
#!/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