Last active
March 8, 2018 16:19
-
-
Save silvae86/6f711588b893893ef3db80cc82939d93 to your computer and use it in GitHub Desktop.
Creating a new repository tracking another
This file contains 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 | |
#credit https://stackoverflow.com/questions/24815952/git-pull-from-another-repository | |
#initialize repository | |
mkdir dendro-install-uporto | |
cd dendro-install-uporto | |
git init | |
git remote add origin https://github.com/feup-infolab/dendro-install-uporto.git | |
echo "# dendro-install-uporto" >> README.md | |
git add . | |
git commit -m "Initial commit" | |
git push -u origin master | |
# track upstream remote repository | |
git remote add upstream https://github.com/feup-infolab/dendro-install.git | |
#block pushing to the tracked repository | |
git config remote.upstream.pushurl "NEVER GONNA GIVE YOU UP" | |
git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment