Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing fork since commit history edit. #703

Open
jnellis opened this issue Apr 5, 2022 · 3 comments
Open

Syncing fork since commit history edit. #703

jnellis opened this issue Apr 5, 2022 · 3 comments

Comments

@jnellis
Copy link
Contributor

jnellis commented Apr 5, 2022

So I noticed my repo was borked from the recent git history mangling, effectively disconnecting it from easily fetching upstream merges. Roughly 1000 forks are currently like this so its a bit of an issue perhaps (I'm no git wizard so maybe its not.) After some searching about I came across these incantations to force your local repo to fetch from this upstream repo then force push to your github fork.

https://gist.github.com/glennblock/1974465

@MartinThoma
Copy link
Collaborator

The simplest way to ensure you are not running into issues is to delete the fork + fork again.

@jnellis
Copy link
Contributor Author

jnellis commented Apr 6, 2022

Yep. Didn't want to do that though, thought there might be some other way. There's at least one fork that has been forked itself and if anyone was using Issues on their fork it would be lost I think. Anyway, I didn't see this addressed anywhere and things like this can have roadblocking effect on further participation. Again, not a git wizard, but I'm betting there is still some dark magic that could have been invoked to delete specific large commits without disrupting the flow of things too much.

@mojoaxel
Copy link
Collaborator

mojoaxel commented Apr 6, 2022

As @jnellis mentioned the easiest way is to reset the local branch:

If not done already you first have to add the coding-horror repository as a remote:

git remote add upstream https://github.com/coding-horror/basic-computer-games.git

After that you need to checkout master and overwrite it with the remote:

git fetch upstream
git checkout master
git reset --hard upstream/master

@mojoaxel mojoaxel pinned this issue Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants