Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup commentary

  • Loading branch information...
commit 5daed4f2c8258617cd2dec612b3f2259fa55beb3 1 parent 3b50193
@jamiew authored
Showing with 21 additions and 8 deletions.
  1. +2 −0  branch
  2. +5 −1 merge
  3. +10 −2 prune
  4. +1 −1  pull
  5. +3 −4 push
View
2  branch
@@ -3,6 +3,8 @@
# branch [branchname]
#
# Create a new local AND remote git branch
+# Setup local branch to use remote tracking
+#
branch=$1
echo branch: $branch
View
6 merge
@@ -2,9 +2,10 @@
#
# merge [branchname]
#
-# Tries to merge local branch "branchname" into master
+# Tries to merge local branch "branchname" into master,
# regardless of what branch you are currently in.
# It will stop you if you are behind & need to pull 1st
+#
branch=$1
echo branch: $branch
@@ -26,5 +27,8 @@ git merge $branch || exit 1
echo "* Deleting merged local branch"
git branch -d $branch || exit 1
+# Potentailly delete the remote branch too
+# I'm undecided about this one
+
echo "* Done"
exit 0
View
12 prune
@@ -1,4 +1,12 @@
#!/bin/sh
-# TODO use all remotes? Or at least "current remote"
-git remote prune origin
+#
+# prune
+#
+# Do some maintenance on the local repository
+# Delete old branches, garbage collect, call your mom, etc
+#
+
+# TODO do this on all remotes
+remote="origin"
+git remote prune $remote
git gc --aggressive
View
2  pull
@@ -2,7 +2,7 @@
#
# Usage: pull
#
-# Pulls remote changes using rebase & tries to rebundle
+# Pulls remote changes using rebase & tries to rebundle,
# safely stashing and re-applying your local changes, if any
#
View
7 push
@@ -2,10 +2,9 @@
#
# Usage: push
#
-# Send your local branch changes to the remote branch
-# This will be pimped out later... I want to make it copy a handy
-# "check out my commit" diff URL to the clipboard. e.g. =>
-# http://github.com/jamiew/app/compare/OLDREF...NEWREF
+# Send your local branch changes to the remote branch,
+# and copy the relevant GitHub 'compare' URL to your clipboard (!)
+# This is Mac-only for the time being
#
remote=origin
Please sign in to comment.
Something went wrong with that request. Please try again.