From 1d82a55e762e1e5c64e6d4a81863e2a73b886750 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 15 May 2012 18:38:16 +0200 Subject: [PATCH] added some git tips in doc --- .gitmodules | 3 --- doc/git-tips.txt | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 doc/git-tips.txt diff --git a/.gitmodules b/.gitmodules index 20e2ea16..e4d61513 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "doc/wiki"] - path = doc/wiki - url = https://github.com/EiffelWebFramework/EWF.wiki.git [submodule "contrib/library/server/nino"] path = contrib/library/server/nino url = https://github.com/Eiffel-World/EiffelWebNino.git diff --git a/doc/git-tips.txt b/doc/git-tips.txt new file mode 100644 index 00000000..ea13e925 --- /dev/null +++ b/doc/git-tips.txt @@ -0,0 +1,25 @@ += subtree-merge = +See http://help.github.com/subtree-merge/ +For instance +: git remote add -f ewf_wiki https://github.com/EiffelWebFramework/EWF.wiki.git +: git merge -s ours --no-commit ewf_wiki/master +: git read-tree --prefix=doc/wiki/ -u ewf_wiki/master +: git commit -m "Added subtree merged in doc/wiki" + + +Update +: git pull -s subtree ewf_wiki master + + += remove git submodule = +1. Delete the relevant section from the .gitmodules file. +2. Delete the relevant section from .git/config. +3. Run git rm --cached path_to_submodule (no trailing slash). +4. Commit and delete the now untracked submodule files. + +Ex: +: vi .gitmodules +: vi .git/config +: git rm --cached doc/wiki +: git commit -m "Removed submodule doc/wiki" +