Created
December 10, 2017 05:13
-
-
Save simbo1905/d57d77eb482b7fda27af4f72fc4809fc to your computer and use it in GitHub Desktop.
git replace local repo contents with new remote repo contents
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
# sometimes your local repo is created by some tool and you need to seed it with some other | |
# sample code where you don't need/want to fork the sample code. Try this: | |
GIT_SRC_URL=$1 | |
remote add simplecode $GIT_SRC_URL | |
git pull simplecode master -X theirs --allow-unrelated-histories |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment