From 0c32cec8f0ceab9766296786911b68e47e911c32 Mon Sep 17 00:00:00 2001 From: tengel Date: Wed, 20 Mar 2024 11:55:04 -0500 Subject: [PATCH] clarify squashing better --- Git-Quickstart.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Git-Quickstart.md b/Git-Quickstart.md index 9db0dde..8c546cb 100644 --- a/Git-Quickstart.md +++ b/Git-Quickstart.md @@ -100,10 +100,10 @@ git commit -m "typo fix" file/name.py SOME projects do not like to see little typo fixes, and request that you "squash" the fixups back into one single commit; this is up to the upstream maintainers how they want to run their project, some people like to see every typo fix as a unique commit - it just depends. -IF REQUIRED squash your fixups back into one single commit and "force-push" it back to your origin; the webUI magically updates itself when the last step is done, so you can check your work by reloading the PR/MR web page: +IF REQUIRED, squash your fixups back into one single commit and "force-push" it back to your origin; the webUI magically updates itself when the last step is done, so you can check your work by reloading the PR/MR web page: ``` -# get list of commits and find the one BEFORE your above commit and get ID (big hex string) +# get list of commits and find the commit ID BEFORE your above work git log # "rebase" your work on that commit ID from the log @@ -113,7 +113,11 @@ git rebase -i # change 'pick' on first line to 'reword' # change every following line to 'fixup' # save-quit, update new commit message - + +# check your work locally first, should be "clean" now: +git log + +# push it back to the webUI in forced mode git push origin -f ```