Last active
March 14, 2017 20:16
-
-
Save upvalue/a8d821df03916d72a4207ee800e48b96 to your computer and use it in GitHub Desktop.
Fix go get "you are not currently on a branch" error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://groups.google.com/forum/#!topic/golang-nuts/t9dLLVwsMlM | |
# run in a directory of git repos e.g. ~/go/src/golang.org/x | |
for dir in ./*; do # use ./*/* for two-level directories eg ~/go/src/github.com | |
pushd $dir; | |
git pull --ff-only origin master; | |
popd; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment