@gunnarmorling solution was about 10000 times easier! To elaborate for git >2.5 (worktree)
Setup $ rm -rf dist $ echo "dist/" >> .gitignore $ git worktree add dist gh-pages Making changes $ make # or what ever you run to populate dist $ cd dist $ git add --all