Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am just playing around with bup for my backups and tested it like this:

BUP_DIR=/mnt/TestTarget/bup bup init

Which gave me the message: Initialized empty Git repository in /mnt/TestTarget/bup/

However in /mnt/TestTarget there seems to be not .git directory.

bup index -uv /home/user/TestSource
bup save -n buptest1 /home/user/TestSource

Now I want to browse the repository with gitk, I did cd /mnt/TestTarget/bup and gitk but it doesn't display anything. gitg gives me Could not find git repository.

So what's wrong here? How can I use gitk or gitg to browse my backup?

share|improve this question

You should have an .git directory into /mnt/TestTarget/bup.

Maybe your bup init goes wrong. In this case, look if you have the same directory (.git) inside ~/.bup

share|improve this answer
There is no .git directory in /mnt/TestTarget/bup and no one in ~/.bup. However if I do gitk in ~/.bup I have some commits with the message bup saved. But there are no backed up files just .bupm's which tells me how I invoked bup save... – student Mar 23 '13 at 12:38
up vote 0 down vote accepted

As @GHugo suggested, using the commands described in my question, produced a backup in ~/.bup. There it is possible to browse it via gitk if you remember to click on tree (and not on patch).

Now If one wants a backup in /mnt/TestTarget/bup the following steps worked for me:

BUP_DIR=/mnt/TestTarget/bup bup init

bup -d /mnt/TestTarget/bup index -uv /home/user/TestSource
bup -d /mnt/TestTarget/bup save -n buptest1 /home/user/TestSource

Then the data and the index seems to be saved to /mnt/TestTarget/bup and you can cd to it ant execute gitk to browse it (clicking on tree to browse the initial commit). However there is no .git directory in it, so it seems to be a bare repository (correct my if I am wrong).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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