You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sergio Rey edited this page Jul 15, 2015
·
2 revisions
If you're interested in working across peoples' branches while in development, it becomes important to understand how to pull others' copies of development code to your branch.
To add additional "sidestreams" to your git repository, use
git remote add <name> <url>
If you'd like to protect yourself from pushing to your colleagues' repositories accidentally, you can set your pushurl to a url that wouldn't resolve correctly:
git remote set-url --push <name> do not push here
This will cause all git push <name> commands to fail for that . This allows you to pull your colleagues' code down to your local machine without fear that you'll accidentally push your changes onto your colleague's repository.
This change looks very obvious in your ./.git/config file. An example file could be:
Then, as an example, to create a branch and fetch a current copy of Serge's network branch (rather than one from yourself or from upstream) you would simply use:
This way, you can always be sure to grab current versions of working code while maintaining the same centralized PySAL repo. This has no risk to the organization or to other developers because you've explicitly disabled push rights to all repositories but your own!
git push serge new_network
fatal: 'Dont push sideways!' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.