Version control on a 2GB USB drive

前端 未结 14 1740
南笙
南笙 2020-12-07 11:30

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 co

相关标签:
14条回答
  • 2020-12-07 11:42

    I'm using GIT according to Milan Babuškov's answer:

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

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

    git init

    git add .

    git commit -m "Done"

    (2) insert USB stick and make a clone of the repository

    cat /proc/partitions

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

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

    (3) take the USB stick home and make a clone of repository at home

    cat /proc/partitions

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

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

    (4) push commits from home PC back to USB stick

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

    cd /home/yoda/project

    git push

    (5) take USB stick to the office and push commits from stick to office PC

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

    cd /mnt/usb/project

    git push

    (6) pull commits from office PC to USB stick

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

    cd /mnt/usb/project

    git pull

    (7) pull commits from USB stick to home PC

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

    cd /home/yoda/project

    git pull

    0 讨论(0)
  • 2020-12-07 11:45

    bitnami stack subversion it's easy to install. You can try to install so too xampp with portableapps.com and subversion.

    0 讨论(0)
  • 2020-12-07 11:47

    The best answer for you is some sort of DVCS (popular ones being Git, Mercurial, Darcs, Bazaar...). The reason is that you have a full copy of the whole repository on any machine you are using. I haven't used these systems personally, so others will be best at recommending a DVCS with a small footprint and good cross platform compatibility.

    0 讨论(0)
  • 2020-12-07 11:50

    Flash memory and version control doesn't seem like a good idea to my ears. I'm afraid that the memory will wear out pretty soon, especially if you take extensive use of various version control operations that make many small disk operations (merge, reverting to and fro, etc).

    At the very least, make sure that you back up the repository as often as humanly possible, in case the drive would fail.

    0 讨论(0)
  • 2020-12-07 11:54

    I'd use git. Git repos are really small and don't require a daemon. You can probably install cygwin or msysgit on your flashdrive.

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

    0 讨论(0)
  • 2020-12-07 11:54

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

    includes

    • command line
    • dvcs
    • cross platform (and easy to compile)
    • 'autosync' command make the essential task of syncing to a backup easy.
    • backup server configuration is a doddle.
    • easy to learn/use
    • very helpful community
    • web ui with wiki and bugtracker included.
    • 3.5Mb, single executable
    • one sqlite database as the repository
    0 讨论(0)
提交回复
热议问题