Say I follow these steps in svn:
rev 1: create a file called 'foo'
rev 2: delete 'foo'
rev 3: create a new file called 'foo'
If I want to see the contents of the first ‘foo‘ using svn, I would need to use the peg revision syntax ‘svn cat foo@1‘ since the traditional syntax ‘svn cat -r 1 foo‘ would fail.
I’ve read that git tracks content and not files, so does that mean there’s no need for something like a peg revision?
will show you the content of the file as it was in “rev1” (note: you need to specify the full path of the file, from the root directory of the Git repo)
As mention in “Restore a deleted file in a Git repo“, you can quickly restore a previous version of a file with a checkout.
(with
$filebeing the full path of the file from the root directory of the current Git repo.)