Course Content

  • MyFirstVSRepo

Course Content


The command git commit -m "commit message>" can be used to add a commit. The -m specifies that we will include a message; keep in mind, though, that commit messages are restricted to 50 characters.

An initial commit is the first commit made in a Git project, aside from the name of this website. Developers use Git to build chains of commits that monitor a project's revision history, as indicated in the previous section.

The command git commit will not work if no files are added. To figure out what to commit, Git only looks at the staging area. Staging, or adding, files can be done using the command line and most Git interfaces, such as GitHub Desktop, by selecting the lines or files you want to stage.

To see a list of files committed, type git show —name-only HEAD # or simply use HEAD: git show —name-only HEAD #.

Pushing and pulling a few times a day is usually enough. More frequent pushes, like @earlonrails mentioned, means less chance of conflicting changes, but this isn't usually a significant concern. Consider it this way: when you commit to your local repository, you're basically declaring, "I believe in this code." It's finished.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere