Skip to content

Instantly share code, notes, and snippets.

@bhargavkakadiya
Created July 27, 2023 00:15
Show Gist options
  • Save bhargavkakadiya/93226089f21f83facb38242293b46a9f to your computer and use it in GitHub Desktop.
Save bhargavkakadiya/93226089f21f83facb38242293b46a9f to your computer and use it in GitHub Desktop.
git squash guide
git add # stage file
git commit --fixup=<commit Hash> # commit with fixup 
git rebase -i HEAD~2 # reabse and squash commit with fixup message and SAVE and SAVE new commit msg
git push origin <branch-name> #--force # git push (use force if past commit is already pushed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment