diff --git a/readme.md b/readme.md index 00d0c34..70cb64a 100644 --- a/readme.md +++ b/readme.md @@ -50,3 +50,12 @@ Fork is where you get your own remote copy of the repository. There is a fork bu To move back to a previous commit, but keep the changes as unstaged do `git reset HEAD~1` To move back to the previous commit and throw away the changes do `git reset HEAD~1 --hard` + + +## Squishing commits + +If you have multiple commits and someone asks you to "squish them" they are asking you to convert your 5+ commits to be a single commit + +The easiest way to do that is to count how many commits you have from master. Then just do `git reset HEAD~` ex. `git reset HEAD~3` then afterwards make a new commit. You will then need to force push to your branch `git push origin YourBranchName --force` + +![](rollbackexample.png) diff --git a/rollbackexample.png b/rollbackexample.png new file mode 100644 index 0000000..66c7272 Binary files /dev/null and b/rollbackexample.png differ