Skip to content

Working with Git(hub)

spartahawk edited this page Mar 28, 2018 · 8 revisions

Working with pull requests from or to other repositories

For my own personal reference, and in case others want to be able to make commits to these pull requests from other repositories, this is how that is done via command line. This avoids the problem both Loobinex and I encountered when pushing changes would create new branches on this repository rather than committing to the existing pull-request. https://stackoverflow.com/a/9529518/9243004

After following the command line instructions at the bottom of the pull request to checkout a new local branch on this repository with the other repo's commits, make any needed new commits while in that checked-out branch, then when going to push...

The "git push [email protected]:git/git.git master"

in this case if we're working with the master branch Schizz repo would be

"git push git://github.com/Schizz/keeperfx-unofficial.git master"

If it were a different branch of the Schizz repo, replace master with that branch name.


If working from an outside repository, for example from Schizz, again, follow the command-line instructions at the bottom of the pull request page to checkout a new local branch on your own outside repository (but containing the commits from this pull-request), make any needed commits while in that checked-out branch, then when going to push, since most pull requests are from branches rather than master...

"git push https://github.com/Loobinex/keeperfx-unofficial.git PR/15"

Merging hotfixes with feature branches

https://stackoverflow.com/a/16957483/9243004

Cherry picking from another repository after having already added it as a repository in local git

https://coderwall.com/p/sgpksw/git-cherry-pick-from-another-repository

Clone this wiki locally