Opposite of git cherry-pick?

git revert isn’t the opposite of git cherry-pick. git rebase -i is.

git revert adds a new commit that removes the changes made by one or more old commits. It doesn’t remove the original commits.

git rebase -i will show you a list of commits from your current commit, going back to the last commit not on your upstream branch. Then you can edit, rearrange, change the commit message, and even delete commits from this list.

Keep in mind that if you’ve already pushed the commits you want to remove, you’ll need to OK removing them with your teammates, because they’ll have to make adjustments once you push the new history with the removed commits.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)