Git local archives

Post tags: | git | git_archives | git_thumb_drive |

Note that truly public git repos can use 2 remote repos:

  • origin at github
  • git1 on the local removable media volume

and private git repos would just have

  • origin on the local removable media volume

Local Git Repos

  • /media/craig/git1/data/git/mydragon.git/
  • /media/craig/git1/data/git/nanoc_blog.git

Make a bare repo

        git clone --bare some-git-source/ some-git-source.git
        

Add git1 repo to a git working directory

          Set a new remote
        git remote add git1 /media/craig/git1/data/git/some-repo.git
        
          Verify new remote
        git remote -v
        

thumb drive

label: git1 (sandisk cruzer 128GB)

Set up git1 thumb drive

Format git1 thumb drive

        mount
         ...
        /dev/sdd1 on /media/craig/art-images type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096,uhelper=udisks2)
        
        sudo umount /dev/sdd1
        sudo fdisk /dev/sdd
        
        mkfs.ext4 --help
        sudo mkfs.ext3 -L git1 /dev/sdd1
        
        mount
         ...
        /dev/sdd1 on /media/craig/git1 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
        

Get the uuid

        sudo ls -l /dev/disk/by-uuid
         .k..
        lrwxrwxrwx 1 root root 10 Aug 13 12:19 e56ce154-0d47-4c63-a4be-388be3ba58d0 -> ../../sdd1
        
        sudo blkid
         ...
        /dev/sdd1: LABEL="git1" UUID="e56ce154-0d47-4c63-a4be-388be3ba58d0" TYPE="ext4"
        

Sneakernet with git1 thumb drive

Arrange that the login craig have the same uid/gid on all computers. Because the filesystem label is git1 the automount would be:

/media/craig/git1/

Make a data folder is writable by user craig.

/media/craig/git1/data

First directory structure:
  • data/git - Place the git repos here.
  • data/home_files_log - Keep logs of files in ~craig/ to support homesick
  • data/xfer - Used to copy files between systems with ext3 automount