Skip to content

Instantly share code, notes, and snippets.

@tarrsalah
Created November 1, 2016 18:51
Show Gist options
  • Save tarrsalah/c96c5604fdf5e363809a2e609d7eae0c to your computer and use it in GitHub Desktop.
Save tarrsalah/c96c5604fdf5e363809a2e609d7eae0c to your computer and use it in GitHub Desktop.
#!/bin/bash
GIT_DIR="PATH_TO_GIT_REPO"
GIT_WORK_TREE="PATH_TO_GOT_WORKTREE"
mkdir -p $GIT_WORK_TREE
git --work-tree=$GIT_WORK_TREE --git-dir=$GIT_DIR checkout -f master
(cd $GIT_WORK_TREE && make)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment