This is the situation:
Someone else has the “main” project on github, which I forked (on github) long ago, then made changes, eventually ending up with with my own mess which I do not want to keep any more.
Now, I pulled the main’s latest version to my local repository and make a few changes. I like to share this new version on my github fork now.
This means there are 3 versions now:
1. Main original on github (to which I can’t push).
2. My fork on github which I want to discard.
3. My local version which I like to get into my github repo.
What do I have to do to push my local version up to github, simply replacing everything that was there? Do I have to erase the repo on gitgub for that? Or is there a way to say: push this, replacing everything you have there already?
Assuming that you’ve added your github fork as a repo named
originand that you care about the master branch:Repeat for each branch you want to replace.
If you have any branches on your old fork you want to delete,