Hello,I think in tutorial 2 (https://git.scm.com/docs/gittutorial-2) in the first code box the second time that file.txt is edited ($ echo 'hello world!' >file.txt) there should be an additional ">" because a single one will overwrite the contents. As far as i understand from what follows bellow, the text should be appended.
Kind Regards, N.Antonetsis