Git useful commands

To Nha Notes | July 28, 2021, 8:44 a.m.

List up commits which exist in one branch feature but doesn't exist in other master.
git checkout feature
git cherry -v master | grep "^\+"

Revert multiple files and commit at the end:

git revert --no-commit bea3cc458ccad076c17b787749e5f0c460f98a52
git revert --no-commit 95042b47c3c2df9ed9b5c1340c22a8a56547ef91
git reset HEAD path/to/code/file

git commit -am "xxx"