git-novice
git-novice copied to clipboard
file versions are not saved; changes to files are tracked/recorded
How could the content be improved?
In the Summary and setup section, we say the following (emphasis mine):
Nothing that is committed to version control is ever lost, unless you work really, really hard at it. Since all old versions of files are saved, it’s always possible to go back in time to see exactly who wrote what on a particular day, or what version of a program was used to generate a particular set of results.
Git does not actually save entire versions of files. Instead it tracks and records the changes that were made to each file. When I was first learning Git, this was an important shift I had to make in my mental model of how my work was being saved. Consider changing the text here to reflect what Git is actually doing. That distinction would have helped me greatly when I was first learning Git.
Which part of the content does your suggestion apply to?
https://swcarpentry.github.io/git-novice/
@maneesha May I ask the words you are suggesting instead? Would it be: Since all changes made within a file are tracked and recorded after comit/push(I'm always confused by the verbs), it is possible to return to a particular day and read the prior versions.
Or something else?
@maneesha, thanks but I'm not sure what you are referring to. Git commits are snapshots, not diffs, from all points of view except the way git compresses files, but this is apparently not relevant for understanding how git works internally. I don't fully understand the technicalities myself. What are you referring to when you say that it helped you understand git?
I am still learing how to conceptualize what Git does myself. When I read "all old versions of files are saved" it makes me think of it in the same way as the comic we use in the intro section. Git is doing something more sophisticated than that. I like the article you've shared. It may be a bit much for this intro lesson. If the maintainers find it would overcomplicate things, we can keep things as they are.
I haven't read the article yet, but the phrases diff and snapshot remind me that for the beginner's introduction, we should limit the nuance and new vocabulary. Thus: Offer this cool blog for instructors or Going Further, but also keep to the comic of the introduction. No wait, this is focused on the setup sentence: Nothing is ever lost. But it is, when that branch is pruned or merged. Hmm. Ah, like Wikipedia has version by editor and day. But Git only hosts the last push. Other changes may be lost in local repos or orphans.
So instead of "Nothing that is committed to version control is ever lost, unless you work really, really hard at it. Since all old versions of files are saved, it’s always possible to go back in time to see exactly who wrote what on a particular day, or what version of a program was used to generate a particular set of results."
Maybe: Active branches are possible to resurface. But not every previous version is archived.(Github is not Wikipedia). While you shouldn't use Git as an archive, it is a much smarter way to know which version of a file is current and most recently accepted.
I was not suggesting to add the material from the blog post to the lesson, but was making the point that it is, at least in some way, indeed true that git stores every version of the file. Github is like wikipedia in this sense. Personally, I would leave it as it is.