git revert merge commit

0ce2ca0b35f59af267241cf4d40d16a3e13ba6f3
df1acf5f54426d30f12c6b4558c3dd922297aae3
e19b912404ffd3c153ccac3072dbf22396896d2a

#要revert的commit是merge
git revert -m 2 0ce2ca0b35f59af267241cf4d40d16a3e13ba6f3




如何在commit里,search代码

git log -p | grep <pattern>


git grep <regexp> $(git rev-list --all)


#Search all revisions for text matching regular expression regexp:

git grep <regexp> $(git rev-list --all)


git log -SFoo -- path_containing_change --since=2009.1.1 --until=2010.1.1



重置代码为远程

git fetch origin
git reset --hard origin/master

你可能感兴趣的:(git)