git status shows that I have 2 commits
# On branch production
# Your branch is ahead of 'origin/production' by 2 commits.
#
but git diff shows nothing
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git diffdoesn’t, by default, show you anything from previous commits. You should usegit logfor that. To show the last two commits, usegit log -2.To compare commits with each other using diff, the syntax is
git diff commit1 commit2. For example, to show you all the changes that occurred between two commits ago and now, typegit diff HEAD^2 HEAD.