So as the terminal was telling me that /etc wasn't a git repository after running git status and gitk resolv.conf & I made a mistake and ran sudo etckeeper init and sudo etckeeper commit "Initial version" which I already ran earlier before realizing that the terminal was printing out this misleading info(!) only when not using sudo.
Now I'd like to know whether (and if so how) I can view changes to files before I reran the init command. Are they still stored somewhere in a way that I could retrieve them? I'm using Debian 9.1 with KDE.
Asked
Active
Viewed 89 times
1
mYnDstrEAm
- 4,008
- 13
- 49
- 108
-
What is the output of `git reflog | head` (as root in `/etc` of course)? – Gilles 'SO- stop being evil' Aug 17 '17 at 23:28
1 Answers
0
Yes. etckeeper init is basically harmless, and it does not affect existing git history.
sourcejedi
- 48,311
- 17
- 143
- 296
-
But then how can I view changes to files? Via [this](https://unix.stackexchange.com/questions/384363/how-can-i-view-diffs-or-at-least-older-versions-of-specific-files-with-etckeeper/384368#384368) question I learned that `sudo gitk resolv.conf &` was a good way for doing so but it only shows "Initial commit" even though the file has been changed. – mYnDstrEAm Aug 17 '17 at 21:36
-
@mYnDstrEAm did you run `etckeeper uninit` as well? (It prompts for confirmation, unless you pass `-f`). – sourcejedi Aug 18 '17 at 08:57
-