Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

“git show-me-the-code-as-of-last-Wednesday” is not a command that git understands. Of course, you can _do_ this in git, by memorising arcane commands, and you still only get the output on your terminal. The other option is basically using a GUI interface for git.

On the other hand, finding the folder for last Wednesday and opening it up is easy.



"git log" is a truly arcane command indeed.

Also, pushing your repo to Github / Gitlab / Bitbucket / (a thousand different free services) and then looking at the commit history visually is incredibly difficult.

Come on people, get a grip.


The actual command you need to use is something like “git show HEAD@{2013-02-25}:./file”, which I would count as arcane. And pushing your repo to github and looking at the commit history is using a graphical interface.


No, the actual commands you need to use are "git log", copy the commit ID, and then paste it to "git show <PASTE_COMMIT_ID_HERE>". Of course you can use shortcuts, but those are entirely optional.

For a single-person, single-branch workflow, git is extremely easy. It gets really complicated when doing something more, until you stop seeing git as a VCS tool, but rather as a tool to manipulate the data structure used to do the VCS. But that's a completely different, unrelated topic to this thread.


Most people that _play_ dwarf fortress probably memorise more arcane commands than that, let alone the people that write it.


I've never needed to see the state of the code at a particular date, but I frequently look up when a particular line of code has changed, who did it, and why.


I’m not saying git is bad and you shouldn’t use it, I’m answering the question asked which was “how could anything but git possibly be easier”.


>The other option is basically using a GUI interface for git.

Unless you don't use a GUI for browsing your file system, you really can't dismiss the GUI that comes with Git. It's easy to use the history browser to check out code from certain dates. And it even simplifies tagging commits so you can check out "release 3" instead of referring to a list of release dates.


git log --since=2019-03-06




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: