Version Control on a 2 GB USB Drive

For my school work, I do a lot of switching computers (from laboratories to my laptop to the library). I would like to put this code under some kind of version control. Of course, the problem is that I cannot always install additional software on the computers that I use. Is there any version control system that I can keep on a flash drive? I have a 2 GB drive to turn it on, but if necessary I can get more.

The projects I do are not particularly big FYI.

EDIT: This should work under windows.

EDIT II: The bazaar turned out to be what I chose. It's even better if you go with TortoiseBzr.

+43
version-control windows usb-drive
Sep 18 '08 at 23:05
source share
14 answers

You can use Portable Python and Bazaar (Bazaar is a Python application). I like to use Bazaar for my personal projects because of its utmost simplicity. It can also be portable, as Python can be portable. You just need to install its dependencies in your Portable Python installation.

+13
Sep 18 '08 at 23:13
source share

I am doing this with git. Just create the Git repository of your directory:

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

Insert the cd stick into the directory on it (I have a large ext2 file that I mount with the -o loop) and do:

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

Then I take the stick to another computer (home, etc.). I can work directly on a stick or clone again. Change to a directory on your hard drive and:

 git-clone /path/to/stick/repos 

When I am done with the changes, I will "git push" back, and when I get back to work, I git click "again" to push the changes from the screen to the working computer. After that, you can use the 'git pull' to receive the changes ( you don’t need to clone anymore, only for the first time) and 'git push' to move the changes in another way.

The beauty is that you can see all the changes using the "git log" and even synchronize some unrelated work when they change in both places in the meantime.

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

+21
Sep 18 '08 at 23:14
source share

Darcs is great for this purpose.

  • I cannot vouch for other platforms, but on Windows it is just a single executable file that you could save to disk.
  • Most importantly, its interactive command-line interface is fantastic and quickly becomes intuitive (Now I really miss interactive commits in any VCS that they miss) - you do not need to memorize many commands as part of your normal workflow. This is the main reason why I use it for git for personal projects.

Setup:

 darcs init darcs add -r * darcs record -am "Initial commit" 

Creating a repository on your lab computer:

 darcs get E:\path\to\repos 

Check that you have changed:

 darcs whatsnew # Show all changed hunks of code darcs whatsnew -ls # List all modified & new files 

Interactively creating a new patch from your changes:

 darcs record 

Interactively clicking patches on the repository on disk:

 darcs push 

It is known as slow for large projects, but I have never had performance problems in small to medium personal projects in which I used it.

Since no installation is required, you can even leave the disc and simply take the darcs binary from the Internet - if I forgot my disc, I pulled out a copy of the repository I want to work with from the mirror that I hold on my web space, then create and write patches for yourself as files:

 darcs get http://example.com/repos/forum/ # Make changes and record patches darcs send -o C:\changes.patch 
+18
Sep 18 '08 at 23:21
source share

The best answer for you is a kind of DVCS (the popular ones are Git , Mercurial , Darcs , Bazaar ...). The reason is because you have a full copy of the entire repository on any machine that you use. I have not used these systems personally, so it would be better for others to recommend DVCS with a small footprint and good compatibility between platforms.

+10
Sep 18 '08 at 23:10
source share

I would use git . Git repos are really small and do not require a demon. You can probably install cygwin or msysgit on your flashdrive.

Edit: here are some instructions for installing cygwin on a flash drive

+8
Sep 18 '08 at 23:10
source share

Just add an additional Subversion resource to the Stick . I just installed it on my 4GB USB Drive, which is pretty simple and painless.

The idea that now I am very tempted to try the Bazaar.

Update: I installed PortablePython on my USB drive, simply, but getting the bazaar there ... I refused, one dependency after another, and since I have work. If anyone knows about a simple portable installer, I would be smart.

+5
Feb 24 '09 at 11:25
source share

I recommend Fossil http://www.fossil-scm.org/

includes

  • Command line
  • dvcs
  • cross platform (and easy to compile)
  • 'autosync' simplifies the task of synchronizing with backup.
  • Configuring a backup server is an argument.
  • easy to learn / use
  • very helpful community
  • web interface with wiki and bugtracker enabled.
  • 3.5Mb, one executable
  • one sqlite database as a repository
+4
Jan 08 '10 at 20:17
source share

You can put subversion binaries on them - they are only 16 megabytes, so you will have enough space for some repositories. You can use the official binaries from the command line or specify a graphical tool (e.g. TortoiseSVN ) in the repository directory. If you feel weird, you can set the drive to automatically launch the SVNSERVE application, turning any computer into a lightweight subversion server the moment you connect the drive.

I found some instructions for this process here .

+3
Sep 18 '08 at 23:13
source share

I use subversion on my flash drive, the official binaries will work right away from the drive. The problem with this trick is that you need to access the command line to work or execute batch files. Of course, I sync files on my flash drive to the server for which I pay. You can always place the repository on your desktop (use the file: /// protocol) if you do not want to receive hosting on the Internet.

+3
Sep 18 '08 at 23:33
source share

I will lynch for this answer, but it works under Windows: RCS .

You simply create an RCS directory in each of the directories with your code. When it's time to check things out, ci -u $FILE . (Binaries also require that you run rcs -i -kb $FILE before the first check.)

Inside the RCS directory there are a bunch of files ,v , which are compatible with CVS, if you want to "upgrade" to this day (and from there to any other VCS system mentioned by other posters) :-)

+3
Sep 18 '08 at 23:56
source share

Subversion will work. See thread

Personally, I prefer to store everything on one computer and a remote desktop.

+1
Sep 18 '08 at 23:16
source share

Flash and version control doesn't seem like a good idea to my ears. I’m afraid that the memory will wear out soon, especially if you widely use various version control operations that do a lot of small disk operations (merging, back and forth, etc.).

At the very least, make sure that you back up the vault as often as humanly possible in the event of a disk failure.

+1
Feb 24 '09 at 11:30
source share

I use GIT according to the answer of Milan Babushkov:

(1) create a repository and commit (on an office PC)

mkdir / home / yoda / project && & cd / home / yoda / project

git init

git add.

git commit -m "Done"

(2) insert a USB drive and make a repository clone

cat / proc / sections

mount -t ext3 / dev / sdc1 / mnt / usb

git clone --bare / home / yoda / project / mnt / usb / project

(3) take the USB drive home and clone the repository at home

cat / proc / sections

mount -t ext3 / dev / sdc1 / mnt / usb

git clone / mnt / usb / project / home / yoda / project

(4) pressing transfers from the home PC back to the USB drive

mount -t ext3 / dev / sdc1 / mnt / usb

cd / home / yoda / project

git click

(5) Take the USB stick into the office and click on the locks from the stick to the office PC.

mount -t ext3 / dev / sdc1 / mnt / usb

cd / mnt / usb / project

git click

(6) pulls from an office PC to a USB drive

mount -t ext3 / dev / sdc1 / mnt / usb

cd / mnt / usb / project

git pull

(7) Pull from USB stick to home PC

mount -t ext3 / dev / sdc1 / mnt / usb

cd / home / yoda / project

git pull

+1
Feb 15 '11 at 9:23
source share

bitnami stack subversion is easy to install. You can try installing xampp with portableapps.com and subversion as well.

0
Sep 21 '08 at 22:13
source share



All Articles