summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-02 18:43:55 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-02 18:43:55 +0100
commitcbc235084bce64b33260d84371c8369e62b85cbb (patch)
treef1efc3dcffc6d2e5120637412695a79da76cbdab /doc
parentc23034c9170a9ee77b5ab0340f2edaa99e649508 (diff)
downloadndim-git-utils-cbc235084bce64b33260d84371c8369e62b85cbb.tar.gz
ndim-git-utils-cbc235084bce64b33260d84371c8369e62b85cbb.tar.xz
ndim-git-utils-cbc235084bce64b33260d84371c8369e62b85cbb.zip
Add cheatsheet, text version of man page
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile-files2
-rw-r--r--doc/ndim-git-cheatsheet.txt44
2 files changed, 46 insertions, 0 deletions
diff --git a/doc/Makefile-files b/doc/Makefile-files
new file mode 100644
index 0000000..ae28305
--- /dev/null
+++ b/doc/Makefile-files
@@ -0,0 +1,2 @@
+# -*- Makefile -*-
+EXTRA_DIST += doc/ndim-git-cheatsheet.txt
diff --git a/doc/ndim-git-cheatsheet.txt b/doc/ndim-git-cheatsheet.txt
new file mode 100644
index 0000000..e280afe
--- /dev/null
+++ b/doc/ndim-git-cheatsheet.txt
@@ -0,0 +1,44 @@
+Set up colorful output:
+ $ git config --global color.diff auto
+ $ git config --global color.status=auto
+ $ git config --global color.branch=auto
+
+How *NOT* to update from upstream (unless you want merge commits):
+ $ git pull
+
+How to update from upstream:
+ $ git fetch
+ $ git rebase origin
+
+How do local master and upstream differ?
+ $ git diff --color origin
+
+How to create patches for submission to upstream:
+ $ git format-patch origin
+
+What happened in the last few commits:
+ $ git log -p --color
+
+What happened in the last N commits:
+ $ git log -p --color -N
+
+What happened in the commit before the last:
+ $ git diff --color HEAD^^ HEAD^
+
+
+Publishing copy of own repo (for upstream to merge from):
+ @local $ git clone --bare my-dir moo
+ @local $ rsync -avz moo user@public:dir/moo.git
+ @public $ cd moo
+ @public $ GIT_DIR=. git-update-server-info
+ @public $ vi description
+ @local $ vi my-dir/.git/config
+ # Add this
+ [remote "public"]
+ url = ssh://user@public/~/moo.git
+ push = ref/heads/*:ref/heads/*
+ @local $ git push public
+
+In cases when you have removed patches from a branch (breaks people's merges):
+ @local $ git push -f public
+