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.


Yes. etckeeper init is basically harmless, and it does not affect existing git history.

  • But then how can I view changes to files? Via this 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 8:57
  • Nope. I never ran that command. – mYnDstrEAm Aug 18 '17 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.