spacepaste

  1.  
  2. # put some stuff into a .db directory using git
  3. git --git-dir=/home/eric/my_workspace/.db init
  4. git --git-dir=/home/eric/my_workspace/.db --work-tree=/tmp/exampledata/item123 add .
  5. tree_sha=`git --git-dir=/home/eric/my_workspace/.db --work-tree=/tmp/exampledata/item123 write-tree`
  6. commit_sha=`git --git-dir=/home/eric/my_workspace/.db commit-tree -m "initial storing of item123" $tree_sha`
  7. git --git-dir=/home/eric/my_workspace/.db update-ref refs/heads/item123 $commit_sha
  8. # check that data out into a different directory
  9. git --git-dir=/home/eric/my_workspace/.db --work-tree=/home/eric/my_workspace/iii checkout item123 .
  10. # make a change
  11. echo "hello" >> /home/eric/my_workspace/iii/world
  12. # check for differences?
  13.