Hacker News new | past | comments | ask | show | jobs | submit login

It's not a common use case in the github era, but you can pull from other repositories than the one you initially cloned.



Still pretty common if you contribute to repos which you don't have commit privileges to. Workflow is:

   1. Clone library's master branch, begin using software.
   2. Discover problem and commit a fix.
   3. Use the Github webui to create a fork of the original repo.
   4. git remote rename origin upstream
   5. git remote add origin https://github.com/me/awesome-library
   6. git push origin master:my-bug-fix
   7. Use Github webui to create a pull request from your 
      my-bug-fix branch into the upstream master.
Having both remotes is necessary, though, when the thing you forked is being actively developed. If there's a review period of a few days, you may need to rebase from the upstream—you want to be doing this from the command line, not bumbling around in the Github webui trying to manage it there.


On the contrary, it's quite common to need to pull down others' branches from GitHub.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: