Skip to content

Suggestions for rebasing a branch, skipping a commit in the middle which deleted files #22984

Answered by lee-dohm
Lucide asked this question in New to GitHub
Discussion options

You must be logged in to vote

In my opinion, the best way to handle that would have been to use the git revert command. In other words, in your specific situation:

git revert 755bca9

This would have created a commit that specifically undid the changes in that commit and only that commit. That would have the benefit of not breaking the repository’s history and it would allow you to specify why you were undeleting those files (rather than using a “Thanos snap” of making the commit disappear).

Let us know if you have more questions.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

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