diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-24 22:44:05 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-24 22:44:05 -0500 |
commit | 0c04235d320c1ebe5e29867dfbcf48109e61d544 (patch) | |
tree | e5e676a772fbf5245c6177c9e19f39d095d98150 /README | |
parent | 145fb779aef9d955b0029b5e4fe27209a3dd435b (diff) |
uninit and auto-init
* Add uninit subcommand, which cleans up all etckeeper and VCS droppings
in /etc. This is useful if you want to switch to a different VCS and
don't have any history to preserve. (Preserving history and converting
is of course possible, but significantly harder.)
* Run etckeeper init on initial install. Closes: #505772
(The idea being that if someone doesn't want to use git, they can
immediatly uninit to easily reverse this.)
* Document how to change the VCS used by etckeeper, without preserving
any history. Preserving history left as an exersise for the reader.
Closes: #515237
Diffstat (limited to 'README')
-rw-r--r-- | README | 46 |
1 files changed, 33 insertions, 13 deletions
@@ -76,19 +76,19 @@ Darcs doesn't support symlinks, so they are also stored in A quick walkthrough of using etckeeper. -First, edit `/etc/etckeeper/etckeeper.conf` to select which version control -system to use. The default is git, and this tutorial assumes you're using +Note that the default VCS is git, and this tutorial assumes you're using it. Using other VCSes should be broadly similar. -The `etckeeper init` command initialises an /etc/.git/ repository. This -command is careful to never overwrite existing files or directories in -/etc. It will create a `.gitignore` if one doesn't already exist -(or update content inside a "managed by etckeeper" comment block), sets up -pre-commit hooks if they don't already exist, and so on. It does *not* -commit any files, but does `git add` all interesting files for an initial -commit later. +The `etckeeper init` command initialises an /etc/.git/ repository. +If you installed etckeeper from a package, this was probably automatically +performed during the package installation. - etckeeper init +The `etckeeper init` command is careful to never overwrite existing files +or directories in /etc. It will create a `.gitignore` if one doesn't +already exist (or update content inside a "managed by etckeeper" comment +block), sets up pre-commit hooks if they don't already exist, and so on. It +does *not* commit any files, but does `git add` all interesting files for +an initial commit later. Now you might want to run `git status` to check that it includes all the right files, and none of the wrong files. And you can edit the @@ -113,9 +113,10 @@ daemons and shouldn't be tracked by git. These can be removed from git: echo printcap >> .gitignore git commit -a -m "don't track printcap" -etckeeper hooks into apt so changes to interesting files in /etc caused by -installing or upgrading packages will automatically be committed. Here -"interesting" means files that are not ignored by `.gitignore`. +etckeeper hooks into apt (and similar systems) so changes to interesting +files in /etc caused by installing or upgrading packages will automatically +be committed. Here "interesting" means files that are not ignored by +`.gitignore`. You can use any git commands you like, but do keep in mind that, if you check out a different branch or an old version, git is operating directly @@ -200,6 +201,25 @@ letting it git add new files and git rm removed ones: chmod -x /etc/etckeeper/commit.d/50vcs-commit +## changing VCS + +By default, etckeeper uses git. If you would like to use some other VCS, +and `etckeeper init` has already been run to set up a git repository, you +have a decision to make: Is the history recorded in that repository +something you need to preserve, or can you afford to just blow it away +and check the current /etc into the new VCS? + +In the former case, you just need to follow three steps: + + etckeeper uninit # deletes /etc/.git! + vim /etc/etckeeper/etckeeper.conf + etckeeper init + +In the latter case, you will need to convert the git repository to the +other VCS using whatever tools are available to do that. Then you can +run `etckeeper uninit`, move files your new VCS will use into place, +edit `etckeeper.conf` to change the VCS setting, and finally +`etckeeper init`. This procedure is clearly only for the brave. ## inspiration |