search

Home  >  Q&A  >  body text

Is it possible to checkout to the latest origin/develop after deleting git develop?

After the local develop was contaminated, I deleted the local develop and then pulled the latest develop from the remote end

Method:

  git branch -d develop
  
  git checkout develop
  

In this way, after integrating the local develop and fixbug, push to the Git library

But there was a conflict between someone else’s code commit and mine 2 days ago

Excuse me, what’s going on?

伊谢尔伦伊谢尔伦2810 days ago655

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:43:22

    Why delete the local develop branch? Isn’t it ok to reset to remote develop?

    git reset --hard origin/develop

    If there is a conflict, resolve the conflict

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:43:22

    There are a few questions about the description
    1. You have deleted the local develop. Why can you still merge it?
    2. Conflicts shouldn’t be considered abnormal, right? After all, when you fix the bug, you may modify the same file as someone else modified

    reply
    0
  • Cancelreply