First of all on zsh
I am using git-auto-fetch plugin. This may messes up if it is automatically take place right after squash is done and led me end up in the rebase
.
I just want to update my previous commit with the new one. I believe squashing is solution for this, where commit and squash it with the previous commit; hence latest commit is updated with the new one.
If the latest commit is:
* b5d2f27 Update Contract
Basically, if my latest commit is b5d2f27
, and I've modified some files locally. I just want to include those changes in commit b5d2f27
.
I have followed: Squash my last X commits together using Git as but it usually ends up in rebase
.
git reset --soft HEAD~1
git add -A .
git commit --quiet --no-verify --edit \
-m "$(git log --format=%B --reverse HEAD..HEAD@{1})"
git push -f