I want to extend a library, available on github to add some features I need. Of course I will made available the new source code as well. Because it's the first time I do this, I'm not sure how to do.
My idea:
- fork the original repository
- create a new branch
- make the changes
- commit them locally
- push the new branch on another (mine) repository (of course, to avoid messing up the original one)
Is it correct? How to test the library while developing it? I mean, in which folder I have to clone the repo?
1 Answer 1
Almost.
- Fork the library to your account
- Check out your fork
- Edit as needed
- Commit locally
- Push back to your fork
Your fork is yours to do with as you wish. Github makes it easy, should you wish, to then pass those changes back up to the original repository (make a "pull request"). But you don't have to do that (and probably don't want to).
You can make a new branch if you like, but that's pointless - your fork is, in effect, a branch itself (well, it's an entire new tree really).
-
2If he plans to make a pull request, then creating a new branch will make things easier.Edgar Bonet– Edgar Bonet2020年01月16日 13:18:06 +00:00Commented Jan 16, 2020 at 13:18