Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mdtareque/75a3fd0d56d1565b5a496c8240e236cd to your computer and use it in GitHub Desktop.
Save mdtareque/75a3fd0d56d1565b5a496c8240e236cd to your computer and use it in GitHub Desktop.

Revisions

  1. @mandiwise mandiwise revised this gist Oct 27, 2014. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Sync gh-pages + master branches
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    // Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/

    git add .
    git status // to see what changes are going to be commited
    git commit -m 'Some descriptive commit message'
    git push origin master
    $ git add .
    $ git status // to see what changes are going to be commited
    $ git commit -m 'Some descriptive commit message'
    $ git push origin master

    git checkout gh-pages // go to the gh-pages branch
    git rebase master // bring gh-pages up to date with master
    git push origin gh-pages // commit the changes
    git checkout master // return to the master branch
    $ git checkout gh-pages // go to the gh-pages branch
    $ git rebase master // bring gh-pages up to date with master
    $ git push origin gh-pages // commit the changes
    $ git checkout master // return to the master branch
  2. @mandiwise mandiwise renamed this gist Oct 26, 2014. 1 changed file with 0 additions and 0 deletions.
  3. @mandiwise mandiwise created this gist Oct 26, 2014.
    11 changes: 11 additions & 0 deletions Sync gh-pages + master Branches
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    // Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/

    git add .
    git status // to see what changes are going to be commited
    git commit -m 'Some descriptive commit message'
    git push origin master

    git checkout gh-pages // go to the gh-pages branch
    git rebase master // bring gh-pages up to date with master
    git push origin gh-pages // commit the changes
    git checkout master // return to the master branch