Using git, how to delete a local copy of a remote branch? Or at least pull without merging?

Another developer deleted and rebuilt a remote branch called "development" in which I already have the extracted copy. He did this to remove and rebuild to remove some of them. It's great.

But when I do "git pull origin development", it continues to receive merge conflicts. However, I do not want what I have in my copy. I want only what is in origin.

So, how do I delete my local copy and pull it back? Or at least pull it out without combining my local information?

+5
source share
2 answers

. - " ", . git pull git fetch, git merge.

$ git fetch origin

.

$ git stash

, , .

$ git checkout development

, , .

$ git reset --hard origin/development

, git reset --hard, rm -rf. , , , .

+9

, :

git branch -D <branch-name>

, :

git fetch

:

git checkout -b development origin/development

git " , ", .

+4

All Articles