Putting the repos on the drive is as simple as copying the project folders. Use the -p switch to preserve file ownership and permissions. If your project directory is ~/projects/project, your flash drive's label is GIT, and you're using current standard Linux automounting, it would look something like this:
cp -pr ~/projects/project /run/media/rdeeson/GIT/
Now we need to update our Git URLs to point to the new location. From the project directory on your computers (ie not the flash drive directory), check what URLs are currently set up with:git remote -v
If the project was originally cloned from a different machine, you'll see an entry for origin listed. Update it to point to the location on the flash drive like so:git remote set-url origin /run/media/rdeeson/GIT/project
If the project is the original and was not cloned from elsewhere, there won't be anything for origin already listed, so add it and then set it as upstream for all relevant branches:git remote add origin /run/media/rdeeson/GIT/project
git pull
git branch --set-upstream-to=origin/master master
The git pull above will output an error about there being no tracking information for the remote branch, however we need to run it in order for the subsequent command to work.You'll need to do this for each of the computers you work on. Afterwards, whenever you do a git pull, it should pull from the flash drive rather than the network. Likewise, git push would push to there as well. However, as Git doesn't like to push to a branch that is currently checked out, I prefer to use git pull from the flash drive folder. To make this work, we need to go to the project directory on the flash drive, remove any origin remote, and then add a remote for each machine you'll be sharing with. (If all your projects have the same local path on all of your machines, you can of course add just one remote to cover them all.)
cd /run/media/rdeeson/GIT/project
git remote remove origin
git remote add local /home/rdeeson/projects/project
Note that rather than changing to the directory on the flash drive and then running your Git commands, you can instead use the -C switch to specify the directory e.g.git -C /run/media/rdeeson/GIT/project pull local master