Git Essentials(Second Edition)
上QQ阅读APP看书,第一时间看更新

Committing the added file

At this point, Git knows about file.txt, but we have to perform another step to fix the snapshot of its content. We have to commit it using the appropriate git commit command. This time, we will add some flavor to our command, using the --message (or -m) subcommand, as shown here:

With the commit of file.txt, we have finally fired up our repository. Having done the first commit (also known as the root-commit, as you can see in the screenshot), the repository now has a master branch with a commit inside it. We will play with branches in the forthcoming chapters. Right now, think of it as a path of our repository, and keep in mind that a repository can have multiple paths that often cross each other.