I'm new to git. I've done some simple operations:
create a repo
add an file 'A' into the local repo, then stage, commit and push to the master branch (commit1)
create a branch by running git checkout -b branch_name
create a new file 'B' and edit 'A', stage, commit, then git push origin branch_name
(commit2)
then to merge it to master branch, I simply run git checkout master
, git merge branch_name
,git push origin master
.
Remote master branch has updated. Then I run git log
in master branch, only 2 commits are shown:
commit1 ae6ebbb... (HEAD -> master, origin/branch_name, origin/master, branch_name)
commit2 ccc6af3...
How Can I find the merge history? (tried git log --merges doesn't work) Am I making any mistake in this process? The reason I want to get the merge hash is to revert back to the status before merge. Could plz any one tell me how to do it?