Skip to content

Instantly share code, notes, and snippets.

@es0m
es0m / git.migrate
Last active August 29, 2015 14:15 — forked from niksumeiko/git.migrate
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.