githubteacher / githubfordevelopers-april

GitHub for Developers Training
4 stars 11 forks source link

Yesterday's prune error? #140

Closed narrly closed 7 years ago

narrly commented 7 years ago

Did you ever figure out yesterdays prune error?

brianamarie commented 7 years ago

Hmm @narrly I don't remember exactly what you're talking about - I'm going to mention @hollenberry so that during the break or after class, he'll be able to answer. 😄

narrly commented 7 years ago

This was at the very end of class after deleting our branch and then when prune was applied an error was occurring.

brianamarie commented 7 years ago

Oh, that's right, thanks for the detail @narrly. @hollenberry reached out to a colleague for an answer. Here are his notes: (posted with permission)

screen shot 2017-04-03 at 3 10 35 pm

This error was super strange! I didn't ever check out to the branch in question, so it was strange to me that the merge was triggering. StackOverflow pointed me here : git update-ref -d refs/remotes/origin/user

This worked! I'm not 💯 on why, but thought I'd leave the notes for the next surprised trainer who might run into something similar in the future. Writing this out also helps me to remember for the future.

brianamarie commented 7 years ago

Does this answer your question @narrly?

hollenberry commented 7 years ago

@narrly Essentially, you'll have to type git update-ref -d refs/remotes/origin/kumardss and then you can pull --prune without issue.

narrly commented 7 years ago

Ok. I get it now. Yes, this answers my question.