Remplacer complètement branche à distance avec l'autre dans github sans laisser de traces de l'ancien

J'ai poussé une branche à un vide dépôt github :

MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHubSquash)
$ git remote add github  https://github.com/Utumno/ted2012.git
MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHubSquash)
$ git push -u github GitHubSquash
Username for 'https://github.com': Utumno
Password for 'https://[email protected]':
//...
To https://github.com/Utumno/ted2012.git
 * [new branch]      GitHubSquash -> GitHubSquash
Branch GitHubSquash set up to track remote branch GitHubSquash from github.

Puis j'ai remarqué que j'avais poussé duvet le long et essayé de supprimer la branche ou de le remplacer par un autre, etc. Je n'ai pas réussi :

MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHub2)
$ git push  :github && git push github GitHub2
ssh: connect to host  port 22: Bad file number
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHub2)
$ git checkout GitHubSquash
Switched to branch 'GitHubSquash'
Your branch is ahead of 'github/GitHubSquash' by 1 commit.
  (use "git push" to publish your local commits)
MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHubSquash)
$ git push  :github
ssh: connect to host  port 22: Bad file number
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
MrD@MRSD /c/Dropbox/eclipse_workspaces/javaEE/ted2012 (GitHubSquash)
$ git push  -u :github
ssh: connect to host  port 22: Bad file number
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

J'ai dû supprimer les pensions de titres et de pousser ma nouvelle branche de nouveau. Que de travail mais à gauche, je me demande :

  1. Que dois-je faire pour remplacer complètement la branche à distance avec
    de l'autre ?

  2. Pourquoi sur la terre j'ai fait le ssh: connect to host port
    22: Mauvais numéro de fichier
    erreurs - alors que mon premier push réussi (et remarque que je suis sur http) ?

    $ git --version
    git version 1.8.1.msysgit.1
    
InformationsquelleAutor Mr_and_Mrs_D | 2013-03-29