Skip to content

Instantly share code, notes, and snippets.

@pastak
Created April 23, 2018 11:31
Show Gist options
  • Save pastak/98306306e2e9f6e905e53214a7e4f474 to your computer and use it in GitHub Desktop.
Save pastak/98306306e2e9f6e905e53214a7e4f474 to your computer and use it in GitHub Desktop.
#!/bin/sh
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
current=`pwd`
cd `pwd`/`git rev-parse --show-cdup`
cp -R . /tmp/git-history
cd $current
fi
git @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment