I use git for version control. One of the biggest conveniences for me is running “git pull” to download the latest commits. But sometimes, the git pull fails because of a file that changed on the server. That’s usually my fault.

So here’s how to go about pulling from git anyways:

From the directory you are trying to “git pull”

  • Your shell will read “Fetching origin”

Then execute the git reset command:

  • You will see something similar to this output:

HEAD is now at 76637bf fix truncate issue


You can confirm that you’ve been reset by running a git pull:

Here was my exact shell session (with a few git pull errors redacted)


If you want to pull a different branch other than master, you need to define that.

Leave a Reply

Related Posts

Linux Server

Easy SSL for ScreenConnect with NGINX Reverse Proxy

On the topic of NGINX Reverse Proxy, it just so happens that the process for installing an SSL certificate onto your ScreenConnect server can be rather difficult, and a much more flexible approach is by Read more…

Amazon AWS

netdata: A remarkable server monitoring utility.

I wanted to write a short introduction to a tool that I’ve been using a lot on my newest servers and development projects. This tool seriously provides the most amazing way of monitoring and comprehending Read more…

Linux Server

NGINX Security Hardening

 After setting up an NGINX webserver with a GoDaddy-issued SSL certificate, I did an SSL test and saw that I was graded a C. That’s average! I want a secure site. So I looked around Read more…

%d bloggers like this: