Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git: Add `browse` alias

Alias to fetch an external repository and checkout the HEAD of a
specified ref. Useful for browsing, testing, and modifying code that
someone wants you to merge.
  • Loading branch information...
commit 432b7188c231e22a7993b88df438509c3cdf4035 1 parent fdaa9ba
@necolas authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  git/gitconfig
View
3  git/gitconfig
@@ -11,6 +11,9 @@
# Add untracked, remove deleted, and show status
adda = !git add -A && git status
+ # Fetch a repository ($1) and checkout its ref ($2) HEAD
+ browse = !bash -c 'git fetch "$1" "$2" && git checkout FETCH_HEAD' -
+
# Diff what is staged for the next commit
diffc = diff --cached
# Diff overview

0 comments on commit 432b718

Please sign in to comment.
Something went wrong with that request. Please try again.