Moving .git around

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For reasons which would take a while to explain, I'm building a repository
in a directory  using "--git-dir=xxxx/.git --work-tree=." and
then doing an "mv  xxxx/.git ./.git"  and then trying to work with
that repository  --- but can't

Below is a sample script. The last line (git add) fails with

fatal: unable to create
'/usr/local/AusTop/AuPrograms/AuServer/testgit/aaa/bbb/.git/index.lock':
No such file or directory

git doesn't seem to realise that there is a .git back up the tree.

I'm using 1.5.5.1

Cheers,
Geoff Russell

------------------------ sample script
#!/bin/sh
if [ -d "testgit" ] ; then
    echo "remove testgit"
    /bin/rm -rf testgit
fi
mkdir testgit && echo yyyy >testgit/sample.sh && cd testgit
mkdir aaa && mkdir aaa/bbb
echo xxxx > aaa/bbb/sample2.sh
mkdir xxx
git --git-dir=xxx/.git --work-tree=. init
git --git-dir=xxx/.git --work-tree=. add *.sh
git --git-dir=xxx/.git --work-tree=. commit  -m demo
mv xxx/.git .
cd aaa/bbb
git add sample2.sh
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux