Skip to content

git filter and accidentally pushing commit history to github #22850

Discussion options

You must be logged in to vote

There’s no easy way to “reverse” a push. Git is a version control system and for that reason errs on the side of keeping data rather than forgetting or losing it. You can, however, change the local history of a branch to whatever you want and use git push --force to force the remote GitHub repository to accept the new history of that branch.

I hope that helps!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants