Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version control on a 2GB USB drive

For my school work, I do a lot of switching computers (from labs to my laptop to the library). I'd kind of like to put this code under some kind of version control. Of course the problem is that I can't always install additional software on the computers I use. Is there any kind of version control system that I can keep on a thumb drive? I have a 2GB drive to put this on, but I can get a bigger one if necessary.

The projects I'm doing aren't especially big FYI.

EDIT: This needs to work under windows.

EDIT II: Bazaar ended up being what I chose. It's even better if you go with TortoiseBzr.

like image 488
Jason Baker Avatar asked Sep 18 '08 23:09

Jason Baker


People also ask

How do you edit a USB drive?

Right-click the USB drive to which you want to assign a persistent drive letter and then click “Change Drive Letter and Paths.” The “Change Drive Letter and Paths” window the selected drive's current drive letter. To change the drive letter, click “Change.”

How to Find USB folder on pc?

If you don't get a prompt to open the USB device when you insert it then open File Explorer and you should see a drive letter for the USB device. Select it in the left hand pane and the contents will be displayed in the right hand pane.

How to see USB files Windows?

Insert the flash drive into a USB port on your computer. You should find a USB port on the front, back, or side of your computer (the location may vary depending on whether you have a desktop or a laptop). Depending on how your computer is set up, a dialog box may appear. If it does, select Open folder to view files.


1 Answers

I do this with Git. Simply, create a Git repository of your directory:

git-init git add . git commit -m "Done" 

Insert the stick, cd to directory on it (I have a big ext2 file I mount with -o loop), and do:

git-clone --bare /path/to/my/dir 

Then, I take the stick to other computer (home, etc.). I can work directly on stick, or clone once again. Go to some dir on the hard disk and:

git-clone /path/to/stick/repos 

When I'm done with changes, I do 'git push' back to stick, and when I'm back at work, I 'git push' once again to move the changes from stick to work computer. Once you set this up, you can use 'git pull' to fetch the changes only (you don't need to clone anymore, just the first time) and 'git push' to push the changes the other way.

The beauty of this is that you can see all the changes with 'git log' and even keep some unrelated work in sync when it changes at both places in the meantime.

If you don't like the command line, you can use graphical tools like gitk and git-gui.

like image 136
Milan Babuškov Avatar answered Oct 10 '22 03:10

Milan Babuškov