Permalink
Browse files

Add documentation for the scripts.

  • Loading branch information...
stephenh committed Nov 12, 2008
1 parent 076b1be commit 9a51e591a683e3d9914c203a046016a921541a3e
Showing with 38 additions and 0 deletions.
  1. +8 −0 scripts/checkout
  2. +10 −0 scripts/create-gitconfig
  3. +5 −0 scripts/create-stable
  4. +12 −0 scripts/pull
  5. +3 −0 scripts/push
View
@@ -1,4 +1,12 @@
#!/bin/sh
+#
+# Makes checkout "just work" in terms of checking out the branch whether or not
+# it exists locally or remotely.
+#
+# If the branch exists locally (e.g. foo), then just check it out
+# If the branch exists remotely (e.g. origin/foo), then create a new local branch
+# If the branch does not exist remote, then make a new local branch and push it
+#
branch_name=$1
View
@@ -1,4 +1,14 @@
#!/bin/sh
+#
+# Creates a separate DAG in your repo for git config files.
+#
+# This allows you to checkout/modify/push the config/hooks for your repo
+# locally. Then, with the help of post-receive-gitconfig, have your changes be
+# automatically updated on the server.
+#
+# Also, it keeps all of your repo-specific information in your repo instead of
+# leaking out into potentiallyshared hook scripts.
+#
# Create an empty file object
empty_file_hash=$(git hash-object -w --stdin <<FOO
View
@@ -1,4 +1,9 @@
#!/bin/sh
+#
+# Creates a separate DAG in the repo to merge stable into.
+#
+# See the other docs about why this is a good idea.
+#
# Make a root directory tree with no files in it
config_tree_hash=$(git mktree <<FOO
View
@@ -1,4 +1,16 @@
#!/bin/sh
+#
+# Makes pull "just work" by correctly rebasing of local commits on top of new
+# incoming commits.
+#
+# This avoids the "same-branch" merges that the default "git pull" creates of
+# your local branch foo being merged into the remote branch origin/foo.
+#
+# Also, even though "git pull" has a branch.<name>.rebase flag, it will replay
+# commits if you have local merges of other branches that are being rebased--the
+# "-p" parameter to git rebase prevents this reply but is not available from the
+# "git pull" command line or config options--hence this script.
+#
branch_name=$(git symbolic-ref --quiet HEAD)
if [[ $? -ne 0 ]] ; then
View
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# Makes push "just work" by only pushing the current branch to origin.
+#
branch_name=$(git symbolic-ref --quiet HEAD)
if [[ $? -ne 0 ]] ; then

0 comments on commit 9a51e59

Please sign in to comment.