Just a simple addition to help someone else looking for this solution. You can pass in the number of previous commits you would like to squash. for example,
git rebase -i HEAD~3
This will bring up the last 3 commits in the editor.
More Related Contents:
- How to do a GitHub pull request
- Preferred Github workflow for updating a pull request after code review
- How can I check out a GitHub pull request with git?
- Can you issue pull requests from the command line on GitHub?
- How can I fetch an unmerged pull request for a branch I don’t own?
- GitHub clone from pull request?
- How to apply unmerged upstream pull requests from other forks into my fork?
- Send a pull request on GitHub for only latest commit
- Merge pull request to a different branch than default, in Github
- After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing
- Pushing to Git returning Error Code 403 fatal: HTTP request failed
- Can’t push to GitHub because of large file which I already deleted
- How to remove a dangling commit from GitHub?
- Import existing source code to GitHub
- Difference between Git and GitHub
- gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]
- How to git fetch efficiently from a shallow clone
- How to link to a specific line number on GitHub
- Pushing from local repository to GitHub hosted remote
- Jenkins linking to my local git repository
- git push heroku master says “Everything up-to-date”, but the app is not current
- Connecting one Github repository to several Aptana projects
- Can a project have multiple origins?
- Error “Your push would publish a private email address”
- How to clone git repository from its zip
- git push error: src refspec main does not match any on linux
- How to install/setup TortoiseGit to work with GitHub
- How can I reduce the ever-increasing time to push a subtree?
- How to manage multiple ssh keys in the ~/.ssh directory
- GitHub Api download zip or tarball link