What have you found for these years?


checkout and track all remote branches (2)

I forgot that I was using GNU sed instead of
Mac's build-in sed, and Mac's build-in sed is
somehow handicapped. So we need to change the
pattern in sed to make it work on Mac's build-in sed.

(I am using GNU sed because Mac's build-in sed
is causing troubles processing UTF-8 characters)

/usr/bin/sed -> /opt/local/bin/gsed

In short, just remove the ? character in previous pattern.

sync = !git branch -r | egrep '^[^>]+$' | sed -E 's/(.*)\\/(.*)/git branch \\2 --track\\1\\/\\2/' | ruby -e 'puts $stdin.read.split(\"\n\").map{ |s| send(:`, s) }.reject(&:empty?)' 2> /dev/null

Also, I discard mac's build in tar too:

/usr/bin/tar -> /opt/local/bin/gnutar

Because Mac's tar would producing tons of garbage about
...... this is really really annoying :(

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.

All texts are licensed under CC Attribution 3.0