From 339340e7e710adf472796a23f71a064b4e8bb646 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 6 Oct 2010 12:26:05 -0400 Subject: [PATCH] More updates to posts/Git/notes.org markup. Because of ikiwiki's link expansion, we can't use org-mode's standard [[...]] search links. Instead, we use :CUSTOM_ID:s and [[#...][...]] reference links. This requires org-mode >= 6.26. --- posts/Git/notes.org | 57 ++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/posts/Git/notes.org b/posts/Git/notes.org index 635a5f5..3c332fe 100644 --- a/posts/Git/notes.org +++ b/posts/Git/notes.org @@ -28,6 +28,9 @@ heart and head into git-land. - State "TODO" [2008-08-28 Thu 05:06] *** TODO [[http://book.git-scm.com/][Git Community Book]] Open source wiki/howto website + :PROPERTIES: + :CUSTOM_ID: git-book + :END: - State "TODO" [2008-08-28 Thu 05:06] ** Interface with SVN @@ -68,7 +71,7 @@ right after the initial comments with Don't forget to =chmod 744= both scripts to make them executible. Also note that these scripts are run from the base repo directory, which is why I had to include the relative path to -pre-commit-make-check, and didn't need =cd ../../= in the check +=pre-commit-make-check=, and didn't need =cd ../../= in the check script. *** DONE [[http://changelog.complete.org/posts/586-Rebase-Considered-Harmful.html][Rebase Considered Harmful]] @@ -122,10 +125,10 @@ People are indeed working on [[http://gittorrent.utsl.gen.nz/rfc.html][the obvio * Case studies -** Gitting chem_web, my first git project +** Gitting =chem_web=, my first git project *** Repository creation and setup -From the [[Git Community Book]]. +From the [[#git-book][Git Community Book]]. *** Install @@ -231,7 +234,7 @@ From the [[http://book.git-scm.com/3_basic_branching_and_merging.html][Git Commu : $ git checkout master : $ git merge dev -You may have to deal with a [[*conflicting merge]]. +You may have to deal with a [[#conflicting-merge][conflicting merge]]. *** Delete a branch From the [[http://book.git-scm.com/3_basic_branching_and_merging.html][Git Community Book]]. @@ -302,6 +305,10 @@ and possibly : $ apt-get install git-core git-svn gitk *** Repository migration from svn + :PROPERTIES: + :CUSTOM_ID: svn-migration + :END: + Following [[http://github.com/maddox][Jon Maddox]] at the [[http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/][Simplistic Complexity blog]]. **** Create the decoy directory @@ -372,7 +379,7 @@ source from the file creates lot of indirectly versioned clutter. To avoid having all your =git status= calls swamped with untracked files, Just add the filenames (globbing allowed) to =.gitignore=. -**** [[Push hooks]] +**** Push hooks TODO *** Making your repository public/Publishing your repository @@ -415,7 +422,7 @@ From [[http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html][Takis blog] *** Repository creation and setup -This is quite similar to [[*Repository migration from svn]] +This is quite similar to [[#svn-migration][svn migration]]. **** Create the decoy directory @@ -427,15 +434,15 @@ This is quite similar to [[*Repository migration from svn]] The login line may not be necessary for other CVS projects. Arguments to git-cvsimport: - |--------+---------------------------------------------------------------------| - | Option | Meaning | - |--------+---------------------------------------------------------------------| - | -p x | Pass =-x= to =cvsps=, which ignores any =~/.cvsps/cvsps.cache= file | - |--------+---------------------------------------------------------------------| - | -* -v | Verbose | - |--------+---------------------------------------------------------------------| - | -d ... | From http://www.comedi.org/download.html | - |--------+---------------------------------------------------------------------| + |----------+---------------------------------------------------------------------| + | Option | Meaning | + |----------+---------------------------------------------------------------------| + | =-p x= | Pass =-x= to =cvsps=, which ignores any =~/.cvsps/cvsps.cache= file | + |----------+---------------------------------------------------------------------| + | =-v= | Verbose | + |----------+---------------------------------------------------------------------| + | =-d ...= | From http://www.comedi.org/download.html | + |----------+---------------------------------------------------------------------| **** Create the clean directory @@ -451,7 +458,7 @@ Arguments to git-cvsimport: : $ cd ../comedi : $ git pull -You may have to deal with a [[*conflicting merge]]. +You may have to deal with a [[#conflicting-merge][conflicting merge]]. *** Create a patch against the cvs source @@ -517,7 +524,7 @@ before doing it, and make any appropriate corrections afterwards. This is a nice way of grouping associated projects. The submodules are included as stand-alone repositories, and the super-project has pointers picking out a particular revision of each submoduel. See the -related [[*Git subtrees]] for an alternate approach. +related [[#git-subtrees][Git subtrees]] for an alternate approach. *** References [[http://git.or.cz/gitwiki/GitSubmoduleTutorial][Git Wiki]] @@ -647,6 +654,9 @@ The changes are still visible in the submodule's reflog: : d266b9873ad50488163457f025db7cdd9683d88b HEAD@{2}: checkout: moving to d266b9873ad50488163457f025db7 ** Git subtrees, merging an entire repository into a subdirectory of your repository + :PROPERTIES: + :CUSTOM_ID: git-subtrees + :END: *** Setup From [[http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html][kernel.org: merge-subtree]] @@ -704,20 +714,29 @@ You probably corrupted something in =.git=. fixed the problem for me. ** Conflicting merge + :PROPERTIES: + :CUSTOM_ID: conflicting-merge + :END: =git pull= or =git merge= aborts with =merge-failed= or some such. This leaves your checked out branch in a state where : $ git diff -shows the merge difficulties. You can either [[*abort the merge]], or -[[*merge by hand]]. +shows the merge difficulties. You can either [[#abort-merge][abort the merge]], or +[[#hand-merge][merge by hand]]. *** Abort the merge + :PROPERTIES: + :CUSTOM_ID: abort-merge + :END: : $ git reset --hard HEAD *** Merge by hand + :PROPERTIES: + :CUSTOM_ID: hand-merge + :END: Edit the marked packages as you see fit. Then let Git know you've accepted your changes with either -- 2.26.2