Guidance on Rebasing in Git - Need to Edit Second Commit in a PR
I've recently raised a pull request (PR) that includes 5 commits. The latest commit is intended to fix a bug introduced in the second commit. Now, I want to clean up my PR by deleting the last commit and incorporating the bug fix into the second commit.
Here are a few details about my situation:
- I've raised a pull request with 5 commits.
- The latest commit is a bug fix for an issue introduced in the second commit.
- Our organization follows a rebase-oriented workflow.
I've been reading about rebasing, but I'm a bit unsure about the steps I need to take to achieve what I want. Can someone guide me on how to remove the last commit, incorporate its changes into the second commit, and update the pull request accordingly?
second commit: