Hi,

On Wed, Nov 20, 2013 at 02:56:44PM +0100, Petr Bena wrote:
> I used my favorite command
> 
> rm -rf <repository> && git clone again
> 
> so it's fixed for now, but it would be cool to know how to fix that anyway

Assuming
* you are on branch production,
* production branch does no longer point to origin's branch, and
* you want a new branch where you're currently at.

Then issue

  git branch new_branch_name HEAD
  git reset --hard origin

(Caution: that will drop uncommitted changes)

Afterwards:
* you're still on production branch,
* the local production branch matches origin, and
* your previous commits to the production branch are at
  new_branch_name.

Best regards,
Christian



-- 
---- quelltextlich e.U. ---- \\ ---- Christian Aistleitner ----
                           Companies' registry: 360296y in Linz
Christian Aistleitner
Gruendbergstrasze 65a        Email:  [email protected]
4040 Linz, Austria           Phone:          +43 732 / 26 95 63
                             Fax:            +43 732 / 26 95 63
                             Homepage: http://quelltextlich.at/
---------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to