Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. How to use Git
  6. How to use Git on Windows
  7. Commit a file
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Commit a file

We are going to add a new file and have it registered under the repository we just created.

Create a file named sample.txt in that directory with the following text content.

Anyone can learn Git with this tutorial and Backlog

Open the "tutorial" directory and right-click on an empty space.

Click “Git Commit -> to ‘main’” from the right-click menu.

When the following screen is displayed, ensure the “sample.txt” under “Changes made” is checked. Then enter a commit message (e.g., “first commit”) in the message box and click “Commit.”

Enter a message in the commit message field, then click the OK button.

When the following progress bar screen is displayed, ensure everything looks good and click “Close” to finish.

If it says Success, the attempt was successful.

Finally, click “TortoiseGit” > “Show log” from the right-click menu. The commit we added will now be listed under the history. If so, you have successfully committed your first file!

The recent commit is added to the history

Next, you’re ready to share the repository with your team.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life