I am really new to git and I tried today to do my second ever commit of some new code to my repo. The thing is, I’m not sure if the git actually occurred.
Github says the last commit was 2 days ago.
When I type git add . nothing shows up.
When I go to github, the Rails3 file says loading commit data. I have been waiting for about 30 minutes but this is still there (and my commit wasn’t all that big).
Is this typical behavior for git or could I have done something wrong? Also, how can I check to make sure in the future that the commits are happening when I try to do them?
First, although you’re using Github, make sure you understand that you’re interacting with your local repository first. (Github isn’t involved until you push.)
The most important command to find out the status of your repository is
git status. This shows files that are:git addhas been run)Once you make a commit, the files will disappear from the
git statusdisplay. At that point, you can usegit logto show the log of commits made in your repository (most recent first).