Reputation: 19610
My source code are managed by git. I work at office on day time and at home on night time. How may I sync the repository from work and home?
The solution so far I google around able to pull or push the commit changes only. What if I want sync untracked and staging files/folders too?
Upvotes: 2
Views: 906
Reputation: 393
A work-in-progress branch would definitely be my choice as the best way to handle this. Using a USB drive or Dropbox folder as a substitute for a version control system which is perfectly capable of doing what you want seems like a backwards step.
Upvotes: 1
Reputation: 1767
How about, have a USB flash. Use two batch files, like this:
FROM_PC_TO_USB.bat
@echo off
robocopy /E /Purge /copy:DAT /MT:16 /MIR C:\My\Repo\Path \My_Usb_Path
FROM_USB_TO_PC.bat
@echo off
robocopy /E /Purge /copy:DAT /MT:16 /MIR \My_Usb_Path C:\My\Repo\Path
Robocopy is an insanely fast and efficient file/folder sync application that's been hiding quietly in windows for a few versions.
Upvotes: 0
Reputation: 6711
Syncing untracked files with git is not possible. But you could put your repository into Dropbox (www.dropbox.com) and let dropbox sync all files while using git for code revision management.
Upvotes: 3