Dobrica Pavlinušić's random unstructured stuff
Git: Revision 7
gitweb-ssl+htdigest.diff

This is my notebook with useful (to me) git hints



Resolve merge conflict

List files which have conflicts

$ git ls-files --unmerged
100644 435b838c30242833e667538c19119e972c30d1cc 1       target-ppc/cpu.h
100644 f5db1cec931da9781f65a0a6b2678370862f6d51 2       target-ppc/cpu.h
100644 f1df741e1e50bea39ae21118f1faab56a06d8a74 3       target-ppc/cpu.h
100644 60e3a36f1c55912a468694ca2c2712abf31f3d57 1       target-ppc/translate_init.c
100644 910fdd1d186f57c29c9d2044401290073ad78fe7 2       target-ppc/translate_init.c
100644 cc8333f92836441fe20c14c7a26bb959a05a3968 3       target-ppc/translate_init.c

Checkout all three versions

$ git cat-file blob :1:target-ppc/cpu.h > target-ppc/cpu.h.1
$ git cat-file blob :2:target-ppc/cpu.h > target-ppc/cpu.h.2
$ git cat-file blob :3:target-ppc/cpu.h > target-ppc/cpu.h.3

Make a diff, and create one copy which will be final with all changes merged

Mark conflict resolved

$ git update-index target-ppc/cpu.h

Migrate google code project to github

dpavlin@t61p:/rest/cvs$ git svn clone -s -A ~/.gitauthors https://perl-cwmp.googlecode.com/svn/ perl-cwmp

svn git error: Unable to extract revision information from commit

# start with the svn head
git checkout -b tempbranch trunk
# bring in all the changes from your branch
git merge --squash myhead
# commit with whatever message you want
git commit
# and ship it up to svn land
git svn dcommit


github setup

$ git config --global user.name "Dobrica Pavlinusic"
$ git config --global user.email "dpavlin@rot13.org"

recover delted files

$ git add something
$ git reset --hard # WOOPS!

$ git fsck --lost-found