Skip to content

Instantly share code, notes, and snippets.

@ddgenome
Created May 3, 2016 13:48
Show Gist options
  • Save ddgenome/f5ea92895dd54fc0eea6be81fab749d2 to your computer and use it in GitHub Desktop.
Save ddgenome/f5ea92895dd54fc0eea6be81fab749d2 to your computer and use it in GitHub Desktop.
$ for d in $(for g in $(find "$GOPATH" -name .git); do r=${g%.git}; b=$(cd $r && git rev-parse --abbrev-ref HEAD); if [[ $b == HEAD ]]; then echo "$r"; fi; done | grep -v -F '/atomisthq/'); do echo "$d"; (cd "$d" && git fetch && git checkout master && git rebase); done
@ddgenome
Copy link
Author

ddgenome commented May 3, 2016

This doesn't exactly undo, since it will leave you at the HEAD of the master branch, which may be further along than you were when godep restore checked out its specific commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment