Timeline for How to squash all git commits into one?
Current License: CC BY-SA 4.0
23 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 2 at 7:29 | comment | added | LOST | The solution is not as straightforward with merges in history: simply marking every commit as "squash" results in merge conflicts. | |
Jan 25 at 13:09 | comment | added | TayJen | not working on ohmyzsh macbook | |
S Dec 9, 2023 at 1:32 | history | suggested | CommunityBot | CC BY-SA 4.0 |
Clarify where to change 'pick' to 'squash'
|
Dec 8, 2023 at 20:57 | review | Suggested edits | |||
S Dec 9, 2023 at 1:32 | |||||
Jun 22, 2023 at 17:30 | comment | added | kennsorr | Tools like GitKraken provide a GUI that lets you bulk select hundreds of commits and squash/reword pretty easily | |
Apr 13, 2023 at 19:05 | comment | added | user137369 |
@eilas No need for the g . You only want to replace the first instance of the word pick on each line. Even better is :%s/^pick/squash/ .
|
|
Aug 31, 2022 at 1:24 | history | edited | jasonleonhard | CC BY-SA 4.0 |
improved clarity of code line
|
Sep 2, 2021 at 12:20 | review | Suggested edits | |||
Sep 3, 2021 at 7:16 | |||||
Feb 19, 2021 at 10:30 | comment | added | Mentor | For nano users, use `ctrl+` to trigger search/replace. | |
S Dec 8, 2019 at 17:55 | history | suggested | mja | CC BY-SA 4.0 |
clarify what version git rebase has --root flag
|
Dec 8, 2019 at 10:49 | review | Suggested edits | |||
S Dec 8, 2019 at 17:55 | |||||
Oct 25, 2019 at 6:42 | comment | added | philshem |
this works find, but I had to do a forced push. be careful! git push -f
|
|
Aug 4, 2017 at 14:17 | comment | added | eilas | If you have many commits it's hard to change 'pick' to 'squash' manually. Use :%s/pick/squash/g in VIM command line to do this faster. | |
Aug 16, 2016 at 21:41 | comment | added | mcont | It actually takes some time. About 1 second per commit here. | |
Jun 15, 2016 at 11:24 | comment | added | catastrophic-failure | Does this take a long time to run? | |
Apr 25, 2016 at 15:30 | comment | added | jishi | This was the only way I could introduce a master branch to my newly created github repo after I had pushed a feature branch that I wanted to create a pull request for. | |
Sep 23, 2015 at 18:21 | review | Suggested edits | |||
Sep 23, 2015 at 18:44 | |||||
Jun 11, 2014 at 2:55 | comment | added | user456814 | This answer is ok, but if you're interactively rebasing more than, say, 20 commits, the interactive rebase will probably be way too slow and unwieldy. You're probably going to have a hard time trying to squash hundreds or thousands of commits. I would go with a soft or mixed reset to the root commit, then recommit, in that case. | |
Dec 19, 2013 at 4:46 | history | edited | Mike Chamberlain | CC BY-SA 3.0 |
added 3 characters in body
|
Dec 6, 2013 at 1:12 | review | Suggested edits | |||
Dec 6, 2013 at 1:16 | |||||
Oct 24, 2013 at 19:53 | review | Suggested edits | |||
Oct 24, 2013 at 20:10 | |||||
Mar 5, 2013 at 20:45 | comment | added | serbaut | Added in 1.7.12: github.com/git/git/blob/master/Documentation/RelNotes/… | |
Feb 13, 2012 at 0:49 | history | answered | Jordan Lewis | CC BY-SA 3.0 |