Skip to content

Instantly share code, notes, and snippets.

@mubaidr
Created March 26, 2020 06:43
Show Gist options
  • Save mubaidr/d3c26f3067bdbd97e892b069214dc6fb to your computer and use it in GitHub Desktop.
Save mubaidr/d3c26f3067bdbd97e892b069214dc6fb to your computer and use it in GitHub Desktop.
force push commit subtree to remote
# create new subtree from latest commit for dist/
commit=$(git subtree split --prefix=dist/ -b gh-pages)
# force push this commit to remote
git push mubaidr.github.io $commit:master --force
# git subtree push --prefix=dist/ mubaidr.github.io master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment