0

Total says mostly the issue i'm having. Instead of clicking 'merge' I clicked 'delete'. How do I undo this action / retrieve a new copy of this remote branch?

Thanks.

easymoden00b
  • 149
  • 9

2 Answers2

1

Could you just do git fetch and then git checkout [branch]? This will only work on Git ≥ 1.6.6.

Falk
  • 26
  • 1
  • 6
  • this would be what you want. – vernak2539 Dec 01 '14 at 18:50
  • i tried git fetch [name] but I get a fatal: [name] does not appear to be a git repository fatal: could not read from remote repository. – easymoden00b Dec 01 '14 at 18:54
  • You don't need to specify a remote, origin will be used by default. So `git fetch` by itself is fine. – Falk Dec 01 '14 at 18:57
  • git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. – easymoden00b Dec 01 '14 at 19:01
  • Look at the solution provided at http://stackoverflow.com/questions/1783405/checkout-remote-git-branch – Falk Dec 01 '14 at 19:03
  • Your answer was very useful and lead me on a quest to find the reason that this error would be present. I used below, btw, as to my solution. thx :D – easymoden00b Dec 01 '14 at 20:23
1

I used

git checkout -b develop origin/develop

to retrieve the remote branch and create a new local branch of this repo.

easymoden00b
  • 149
  • 9