0 votes
1 view
in Devops and Agile by (20k points)

Is there a way to do a git pull that ignores any local file changes without blowing the directory away and having to perform a git clone?

1 Answer

0 votes
by (109k points)

For me, the following worked:

(1) First fetch all changes:

$ git fetch --all

(2) Then reset the master:

$ git reset --hard origin/master

(3) Pull/update:

$ git pull

Also, check out this Git Tutorial to know more.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !