Created
April 13, 2011 11:46
-
-
Save nils-werner/917405 to your computer and use it in GitHub Desktop.
Clone a repo, replace the origin remote and initialize all submodules
This file contains hidden or 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 | |
cd $(pwd) | |
git clone $1 . | |
git submodule update --init | |
git remote rm origin | |
git remote add upstream $1 | |
git remote add origin $2 | |
# | |
# Put this file in any of the directories of your PATH (try echo $PATH to see them) | |
# | |
# Example: | |
# clone git://github.com/symphonycms/symphony-2.git [email protected]:nils-werner/symphony-2.git | |
# | |
# This will clone from the official Symphony-2-repo, initialize all submodules and add your own fork as the origin | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment