How do I see a file as it was in an old commit?
Open the commit, select the file, and widen the diff context to the whole file.
- Find the commit in the history.
- Select the file in its list of changed files.
- Set the diff context to the whole file.
You are then looking at the file as it stood at that commit, with the changes that commit made marked in it — which is usually more useful than the file alone, since the reason you went looking was that something about it changed.
If the file was not touched by that commit it will not be in its list. Use blame to find a commit that did touch it, and step back from there.
To get the contents out — into an editor, or into a file — the command line is the direct route:
git show <commit>:<path> > /tmp/old-version.swift