How to undo 'git fetch'

前端 未结 4 1203
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 21:25

I just added additional remote A to my repo B and then run git fetch A. How can I undo the fetch? If I just remove remote A

4条回答
  •  难免孤独
    2020-12-30 22:11

    You can undo all fetches from remote A simply by removing this remote:

    git remote remove A
    

    Now just add it again and fetch only single branch:

    git remote add A 
    git fetch A 
    

提交回复
热议问题