Tips and tricks practical Git
K
I am a Software Engineer from Ewoosoft Vietnam. Domain: Healthcare programming
Merge multi commits of a branch into one commit
Sometimes, when you want to have a nice view of commits of 1 branch, and you want to merge multi commits into one commit:
Ideal: Soft reset to a commit —> commit —> and force push to the server.
Steps:
git reset --soft [commit hash] git commit [...] git push --force origin [branch name]