How to git force pull from remote branch ?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today now in this post i will show you how to git force pull from remote branch. When we were working on our Web application by using git bitbucket repository, sometimes we fetch some problem when first we did commit on our master branch and we are think we did 3 or 4 commits, and our team mate pull also in his local system ,but we did wrong code in this commit so that’s time we need to remove that 3 or 4 commit from our bitbucket repository. Because he did remove that commits from his system but when we did pull but nothing to change, and we also remove cache but same.

But At last we though that we have to hard pull that’s why we the fired following command. if we also fetch problem like this then let’s see this command:

Example:

git fetch --all
git reset --hard origin/master

Read Also : How to Create Custom Blade Directive in Laravel?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →