Organizing Repository Directories

I had a quick question about organizing all the repositories from bitbucket that I’ve forked and cloned onto my computer for the various exercises that we have to do for the Alpha course. Each repository currently has its own individual folder in my Home folder, but I’ve realized after a few days that this will easily get very messy going forward, and I was wondering if I could simply move all of these repository folders to another directory in the Home folder (e.g. “~/AppAcademy”). I was thinking I could manually do this by using something like

mv <repository_name> ~/AppAcademy/

But I wanted to make sure there wouldn’t be any other issues I might end up running into if I try to access those exercises later in time (perhaps problems related to the remote pointing to Github or BitBucket).


Hey Jonathan !

As far as I know this shouldn’t be an issue, all your git config files will be moved with the entire directory, so information related to the remote will remain the same. Technically it should work, but the best thing just try out one directory and see if it still works.

So long as you move everything in the folder you want to move into a your new folder, it shouldn’t be an issue with git or communicating with the remote repository. there should be a hidden directory in your exercise directory named: .git be sure that gets moved as well.

A quick note on the mv command though: be careful not to accidentally move everything in your home directory into your new appacademy/ directory or to just rename the directory, not actually move the directory itself to your new appacademy/ directory.

all your exercise folders you forked from bitbucket should start with a string of letters and numbers so something like this should move all your exercise directories

mkdir ~/appacademy/
mv ~/9c123v45s-* ~/appacademy/

but with your exact numbers instead.

if you were to just use

mv ~/9c123v45s-yourname-rspec1/ ~/appacademy/

you would just be renaming the directory.