git checkout branch - now have duplicate

Now I have this

[root@RUSH pmtsystem]# git branch -a
  master
  remotes/origin/upgrade-to-mpdf56
* rush
  remotes/origin/HEAD -> origin/master
  remotes/origin/atc
  remotes/origin/master
  remotes/origin/pmt
  remotes/origin/rush
  remotes/origin/upgrade-to-mpdf56

The idea was to checkout remotes/origin/upgrade-to-mpdf56 but this went horribly wrong. Can it be fixed?

Answers


The right way to get a copy of a remote repo would be something like:

git clone -b upgrade-to-mpdf56 git@foo.example.com/path

To put your local cpoy on that branch and merge your diffs do:

git checkout -m upgrade-to-mpdf56

Use Schleis suggestion to delete the local evil branch.


You should be able to do git branch -d remotes/origin/upgrade-to-mpdf56 As you can't delete a remote branch in this manner.

You can also edit your .git/config file and remove the entry for the branch there as well.


Need Your Help

custom dialog with a text field in winmobile

c# windows-mobile smartphone

I'm looking to have a simple custom dialog box, like a message box, that has a label and a TextBox. If there's a simple way to do this, sorry! I'm really not well versed in the dialog stuff.

Authenticate users with remote server in Yii framework

authentication yii

I am using yii framework for an application and I need a set of users to be authenticated with a remote server.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.