Daily Archives: 08.06.2018
git squash variants
If you just want to squash all commits into one. 1. The simplest way: git checkout -b <temp-branch> origin/master git merge —squash origin/<branch-with-changes-you-need> git commit -m ‘commit message’ git push origin refs/heads/<temp-branch>:<new-branch> https://stackoverflow.com/a/5309051 If you have a message like ‘error: failed to push some refs to’, add —force to the last command.