This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Git/tracking-etc
From Gentoo Wiki (test)
< Git
Jump to:navigation
Jump to:search
Tracking /etc with git is a common procedure with gentoo.
1. Change directory to etc.
root #
cd /etc
2. Initialize git.
root #
git init
3. commit initial, and any further known good revisions:
root #
git add * #add all files not in git ignore file
root #
git commit -m 'required'
4. To load a specific revision:
root #
git rev-list #display all possible revisions
root #
git checkout (insert your revision hash here)#select known good revision example: git checkout db1f3239404ab67e64218939b9e0155c04303fff
5. To revert unwanted changes:
root #
git reset --hard #undo all changes from revision checked out.
or
root #
git reset
root #
git checkout .