提交文件
我们将添加一个新文件,并将其注册在我们刚才创建的存储库中。
使用以下文本内容在该目录中创建一个名为sample.txt
的文件。
Anyone can learn Git with this tutorial and Backlog
打开“tutorial”目录,在空白处右击。
从右键单击菜单中,单击“Git Commit -> to ‘main’”。
当下面屏幕显示时,确保要勾选“Changes made”下的“sample.txt”。然后在消息框中输入提交消息 (例如,“first commit”),并单击“Commit”。
![Enter a message in the commit message field, then click the OK button.](/static/1ba66b6630224ccec1c425782ee899db/5a190/01.png)
当显示以下进度条屏幕时,确保一切正常,然后单击“Close”结束。
![If it says Success, the attempt was successful.](/static/c68a67e56145e35083264d1ef2c1e956/5a190/02.png)
最后,从右键单击菜单中单击“TortoiseGit” > “Show log”。我们添加的提交现在将列在历史记录下。如果是这样,您已经成功提交了您的第一个文件!
![The recent commit is added to the history](/static/298a073dec772eb16ad6782ea1049fdf/5a190/03.png)
接下来,您已准备好与您的团队共享存储库。