Similar to:
- Git On A Keystick & GitHub
- Using GIT on USB stick for "travelling code"
- git: how to properly share local copy between multiple PCs
- Git: push-pull on working copies
- How to convert existing non-empty directory into a Git working directory and push files to a remote repository
I'm trying to figure out the workflow steps to accomplish the following:
- Having worked locally on "home", I want to start a repository in
W:\DEV\proj1
git init W:\DEV\proj1
cd W:\DEV\proj1
git add *
git commit -m"1st home"
- I then want to clone this repo to "portable" somewhere else (i.e. a usbkey), lets say
P:\DEV\roam1
git clone . P:\DEV\roam1
- Then I want to be able to do work in either location ("home" or "portable") and sync changes back and forth.
- (in portable)
// new file f1.txt
git add *
git commit -m"1st portable"
git ???
-- sync f1.txt > "home"?
- (in home)
// new file f2.txt
git add *
git commit -m"2nd home"
git ???
-- sync f2.txt > "portable"
- repeat
- (in portable)
Part A) I think I understand how to clone and sync to a "centralized hub", i.e. github or putting a bare repo on a usb stick and cloning from it whenever I'm at a new location, but I'd rather not have to clone from the portable repo every time I want to get work done in a new place. Also, in the case where I just want to look at the file on a computer that doesn't have git installed.
Part B) Another applicable scenario is that I want to use git to basically backup a directory to an external harddrive (which pushing to a bare repo would normally be fine) but I want to access the files on the harddrive on another computer without git installed.