Subsecciones

Comentarios y Consejos

How can I push a local Git branch to a remote with a different name easily?

$ git branch -a
* gh-pages
  remotes/origin/HEAD -> origin/gh-pages
  remotes/origin/gh-pages
Of course a solution for this way to work is to rename your master branch:
$ git branch -m master gh-pages
[~/Downloads/tmp(gh-pages)]$ git branch 
* gh-pages

Otherwise, you can do your initial push this way:

$ git push -u origin master:gh-pages
Option -u: for every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull.

favicons y shortcut icons

Casiano Rodríguez León
2016-03-27