If your repository is not corrupted by the missing objects, this oughta do 

cd ~
mkdir temp-repo
sudo cp -r /path/to/backed/up/.git temp-repo/
sudo chown -R [your-username] temp-repo
cd temp-repo
git reset --hard

On Monday, July 9, 2012 7:14:51 PM UTC+2, Daniel3ub wrote:
> Hello, guys.
> So I had to format my machine. I was using git as a local repo only, and 
> after a little research, I´ve found that I only had to backup my dir 
> containing the .git dir.
> I make several backups of this dir using rsync, one backup each week.
> Now I want to restore my backup to continue development.
> When I rsync one of my backups back, I get the following warning:
> "rsync warning: some files vanished before they could be transferred (code 
> 24)  at main.c(1070) [sender=3.0.9]"
> This message regards some .git/objects 
> When I git status:
> "fatal: Cannot change to '/root/.local/share/Trash/files/..': Permission 
> denied
> If I use sudo git status:
> fatal: Not a git repository (or any of the parent directories): .git
> It seems like a permissions problem, right?
> What am I doing wrong? What is the proper way to backup/restore a git 
> controlled directory? How can I get my git tree back?
> Thanks for any help!
> =====
> Daniel Trezub
> http://www.gameblogs.com.br

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to