git discard all changes and pull from upstream

Reset your git project to last working commit and pull updated code for that branch.
Here master branch is used for example.

git reset --hard origin/master
git pull origin master

Nishant Vaity

I am Software Engineer, Technology Mentor & Entrepreneur. I am passionate about the technologies I use and always eager to share & learn more from that passion. I am an experienced Software Engineer with 8+ years of experience in coding high-traffic websites. Proficient in HTML, JavaScript, jQuery, CSS with LAMP / MAMP / WAMP Stack. Contributor for WordPress open source plugins and Translator (Marathi) for WordPress 4.5.x.