提交文件
我们将添加一个新文件,并将其注册在我们刚才创建的存储库中。
使用以下文本内容在该目录中创建一个名为sample.txt
的文件。
Anyone can learn Git with this tutorial and Backlog
在 Sourcetree 的书签窗口中双击tutorial
存储库,来弹出存储库操作窗口。如果目录中有任何新添加或编辑的文件,将显示在工作树文件检查器的左下角。
因为我们刚才将sample.txt
文件添加到tutorial
目录中,所以我们看到它列在那里。

右键单击“sample.txt”文件,并选择“Add to Index”。该文件将移动到上面的“Files staged in the index”列表中。

单击工具栏上的“提交”图标,输入提交消息 (例如,“first commit”),然后单击“Commit”。

完成后,您将在“main”分支历史记录中找到提交。您可以通过单击左侧菜单中的“History”来验证提交是否成功。

接下来,您已准备好与您的团队共享存储库。