I've been using etckeeper on my Digital Ocean droplet for sometime and have made numerous changes to the /etc since that time.

I now realize that i've been using bzr all this time and would like to switch to git; but fear that i shall loose all the incremental changes i've made to my /etc directory.

Is there ANY way to not only switch from bzr to git, but convert bzr's incremental changes to git as well?


  • This was the top google result I got for 'migrate etckeeper bzr to git' - have you tried the steps there? It sounds like it should be possible. You can always make a backup of /etc somewhere first and test to see if the conversion works as you expect. – mvermaes Nov 3 '14 at 11:57
  • @mvermaes: Your comment reads like a "let me google that for you", which is frowned upon. Please convert the gist of the answer on that page into an answer here, – Martin Schröder Nov 4 '14 at 13:54
  • Yes, I can see how my comment could be interpreted in that way, and I apologize if it was. I haven't performed that type of migration with etckeeper myself before, so I felt it was better to leave the suggestion as a comment rather than a definitive answer. I'll put up an answer with that caveat. – mvermaes Nov 4 '14 at 18:04
  • I tested out the process from that link, but wasn't quite able to make it work, so I've deleted my answer for now. – mvermaes Nov 5 '14 at 4:21
  • The git book contains the answer how to convert lots of SCMs to git: "9.2 Git and Other Systems - Migrating to Git". It is as close to the official solution as someting can be. – grin Jan 18 '18 at 8:05

You can export the bzr history into git by

cd /etc
git init
bzr fast-export --plain . | git fast-import

Then just reconfigure etckeeper to use git (set VCS="git" in /etc/etckeeper/etckeeper.conf).

The above commands require the fastimport plugins to be installed in bzr and git.

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.