clarify squashing better
parent
4a19004cb0
commit
0c32cec8f0
1 changed files with 7 additions and 3 deletions
|
|
@ -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.
|
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
|
git log
|
||||||
|
|
||||||
# "rebase" your work on that commit ID from the log
|
# "rebase" your work on that commit ID from the log
|
||||||
|
|
@ -114,6 +114,10 @@ git rebase -i <HASH ID>
|
||||||
# change every following line to 'fixup'
|
# change every following line to 'fixup'
|
||||||
# save-quit, update new commit message
|
# 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 <my branch> -f
|
git push origin <my branch> -f
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue