Question

I recently inherited a ruby project. The dev before introduced some bugs that made it on to staging. Now there are a few static pages that need to get on prod by tomorrow sans the problematic code. What is the best way to approach this? I have looked at git rebase but I'm not sure that is what I want to do or how to do it properly in this situation.

Was it helpful?

Solution

If you know the specific commit those pages were introduced in, you could git cherry-pick those commits out into a new branch and switch to that temporarily.

Otherwise, an interactive rebase -- git rebase -i -- will allow you to select the commits you want to keep and those you want to discard. This should, of course, only be done after having made full backups.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top