One situation in Git that I still find confusing is this:

```
$ git clone https://github.com/dude1/project

```

Whoops, that's not really the right version. I'll switch over:

```
$ git remote add dude2 https://github.com/dude2/project
$ git fetch dude2
$ git checkout dude2/master

Note: checking out 'dude2/master'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at f3o845a... 

```

Hrm. I want `master` to refer to dude2/master.

```
$ git checkout -b master dude2/master

fatal: A branch named 'master' already exists.

```

Short of deleting the whole directory and starting again, how do I cleanly switch repositories?