How to git force pull from remote branch ?

force pull from remote branch

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 Md. Mostofa Kamal

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

View all posts by Md. Mostofa Kamal →