git fetch origin/feature22
git checkout feature22
git merge-base feature22 main # will return the SHA of their 050dc022f3a65bdc78d97e2b1ac9b595a924c3f2
git reset 050dc022f3a65bdc78d97e2b1ac9b595a924c3f2
$ git log -1
commit 9883e13257f2e7555eb6e3b14b2c814978c75692 (HEAD -> MyLocalBranch)
Author: vikram <vikramguptavit@gmail.com>
Date: Sun Oct 11 23:32:45 2020 -0400
this is my last commit message
现在使用下面的命令来查看HEAD指向的位置:
$ git rev-parse HEAD
9883e13257f2e7555eb6e3b14b2c814978c75692