There is a repo on github that I would like to build off of. What is the best practice for doing this? Here is what I've done:
1) Fork the repo. 2) Start a new repo. 3) Change the forked repo's remote origin url to the new repo. 4) Push the new repo's local copy to github.
This gives me a 'starting point' for the new repo, however, I still have the original repo's commit history etc. What's the best practice /etiquette for keeping things like this (as opposed to deleting the commit history & starting from scratch.)
The original author will get full credit regardless on what I do, but it seems the commit history might confuse folks who want to use my repo.
Once I start adding features / code, it will be different, but the commit history will be the same. Is it something that is expected?
Yes, but the true idea behind the fork is the possibility for you to contribute back to the upstream
repo (i.e. the repo you have forked on GitHub side), through pull request.
That is why you usually don't just change the url of origin to the new repo, you also register a remote repo 'upstream
' referring to the original repo you have forked.
The other idea, even if you don't contribute back, is to keep up with any evolution from upstream
: you can git fetch upstream
, and merge or rebase whatever new commits from upstream you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With