trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: February 2012

Howto move local git repository from ~/dirA -> ~/dirB

From: "David C. Rankin" <drankinatty@...>
Date: Sat, 18 Feb 2012 09:36:53 -0600
Guys,

  With svn if I needed to more the location of my local repository, I could
simply move it. Like mv ~/test/tde ~/trinity. Can I do the same thing with a git
repository and not screw up the metadata in the tree?

  I note the .git directories in the tree contain worktree information:

09:34 nirvana:~/tdegit/tde> grep -r tdegit .git *
.git/modules/main/tdenetwork/config:    worktree =
/home/david/tdegit/tde/main/tdenetwork
.git/modules/main/tde-i18n/config:      worktree =
/home/david/tdegit/tde/main/tde-i18n
.git/modules/main/tdebase/config:       worktree =
/home/david/tdegit/tde/main/tdebase

  Can I move the tree and then just sed the worktree info, or will one of the
'git' commands do this for me?

-- 
David C. Rankin, J.D.,P.E.