How do I squash multiple commits into one? I'm working on a fix for an issue on a open open source project and I did the following so far:
- I forked the repo on GH
- cloned the fork onto my machine
- checked out a branch, added the upstream repo (the repo that I forked), made changes to the code,
git add
,git commit
,git push -u origin my_branch
. - logged onto GitHub and made the pull request.
- After that, I made multiple changes to my pull request via GitHub.com and committed each one.
One of the mods now whats me to combine all these commits into one, but I have no idea how. I also need to make some more changes to the code. But this time, I want to make the changes locally (instead of doing it on GitHub). So, how can I update my local repo so that it reflects that changes I made on GitHub?
Thank you!