We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daf558a commit 641ee08Copy full SHA for 641ee08
README.md
@@ -381,6 +381,14 @@ git config --global delta.side-by-side true
381
# Find which commit added a specific file eg foo.cpp
382
# https://stackoverflow.com/q/11533199
383
git log --follow --diff-filter=A --find-renames=40% foo.cpp
384
+
385
+# Squash all commits in a branch to a single commit without git rebase
386
+# https://stackoverflow.com/a/25357146
387
+git checkout my_branch
388
+git reset $(git merge-base main $(git rev-parse --abbrev-ref HEAD))
389
+git add .
390
+git commit -m "one commit to rule them all
391
392
```
393
394
[Atlassian Git Tutorials](https://www.atlassian.com/git/tutorials)
0 commit comments