Alex Rivera | Logout

How to rename git root folder?

Asked 2011-08-26T03:15:20.227
119

I've just started using git in Vista, with my repository under /path/to/project/git repo.

I've now found that the space in the folder name is a minor irritation when working in git bash.

Can I just rename the folder to /path/to/project/gitrepo? Is everything within the git config relative, or is there anything that explicitly refers to the parent folder?

I've tried just taking a windows copy of the main folder, and run git bash on that, and 'git log' shows the changes I had previously made. So I assume renaming the main folder is OK, but I'd like to be sure before I go any further.

Edit
Report

1 Answer

117

Yes, it is safe to rename the folder containing a Git repository. All paths inside the Git repository are relative.

answered 2011-08-26T03:17:50.923

Your Answer