Skip to content

Instantly share code, notes, and snippets.

@amarzar
Forked from ivandevp/gh-pages.sh
Created October 20, 2020 10:33
Show Gist options
  • Save amarzar/9502e7d3bf68384e7cb8a98bb62538b3 to your computer and use it in GitHub Desktop.
Save amarzar/9502e7d3bf68384e7cb8a98bb62538b3 to your computer and use it in GitHub Desktop.
GH Pages workflow
# Creación del repositorio
git init
git add -A
git commit -m "Primer commit"
git remote add origin https://github.com/<username>/<nombre-repositorio>.git
git push origin master
# Creación de rama gh-pages
git checkout -b gh-pages
git push origin gh-pages
git checkout master # Importante! Volver a master para no hacer cambios directamente en gh-pages
# Nuevos cambios
git add -A
git commit -m "Cambio en ..."
git push origin master
# Actualizar gh-pages
git checkout gh-pages
git merge master
git push origin gh-pages
git checkout master # Importante! Siempre vuelve a master para no hacer cambios directamente en gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment