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.](/static/1ba66b6630224ccec1c425782ee899db/5a190/01.png)
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.](/static/c68a67e56145e35083264d1ef2c1e956/5a190/02.png)
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](/static/298a073dec772eb16ad6782ea1049fdf/5a190/03.png)
Next, you’re ready to share the repository with your team.