Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 12 lines (7 sloc) 0.334 kb
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh

# Based on an alias written by doener on #git.

# usage: git retrack REMOTE URL BRANCH

branch=$(git rev-parse --symbolic-full-name HEAD | sed 's/refs\/heads\///')

git remote add -f $1 "$2" || echo But that\'s perfectly OK.

git config branch.$branch.remote "$1"
git config branch.$branch.merge "refs/heads/${3:-$branch}"
Something went wrong with that request. Please try again.