⇤ ← Revision 1 as of 2009-09-05 22:42:15
Size: 1279
Comment:
|
Size: 1140
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
From Davor's email to hcoop-sysadmin: In any case, [[http://kitenet.net/~joey/code/etckeeper/|Etckeeper]] puts /etc under revision control, git |
[[http://kitenet.net/~joey/code/etckeeper/|Etckeeper]] puts /etc under revision control, git |
Line 6: | Line 4: |
That means you can cd /etc, and then execute the most useful | Once installed, an admin needs to run '''etckeeper init''' to initialize ''/etc/.git'', and then invoke '''cd /etc/; git commit -am "Initial commit"''' to complete the install. After that, you can cd /etc, and then execute the most useful |
Line 18: | Line 19: |
With etckeeper installed, this issue of authdaemonrc being overriden would simply be a matter of doing 'git diff', spotting the unwanted changes, and doing 'git checkout courier/authdaemonrc' to restore the file to previous state. Note that this is not the only mechanism we have for tracking changes to /etc (we use changetrack as well, and I believe mwolson had something that used Mercurial installed), but I'd aim to make etckeeper a new standard. |
|
Line 29: | Line 21: |
Each time you make a change, run, for example `git commit -a -m "changed blah blah"`. | Each time you make a change and are happy with it, run commit like `git commit -am "changed blah blah"`. == Notes == EtcKeeper is better than custom solutions as it also adds apt hooks, so the files are added and commited to git automatically before/after apt-get installs. |
Etckeeper puts /etc under revision control, git by default, which then behaves like a normal git repository.
Once installed, an admin needs to run etckeeper init to initialize /etc/.git, and then invoke cd /etc/; git commit -am "Initial commit" to complete the install.
After that, you can cd /etc, and then execute the most useful commands:
git log (see commit dates & commit msgs) git log -p (see commits with diff included) git add FILE... (add FILE to git) git diff (see any differences since last commit) git commit -am "Commit message" (commit your changes after modification) git checkout FILE (override FILE with version from last commit)
1. Usage
Each time you make a change and are happy with it, run commit like git commit -am "changed blah blah".
2. Notes
EtcKeeper is better than custom solutions as it also adds apt hooks, so the files are added and commited to git automatically before/after apt-get installs.