本文介绍了如何使git push origin --force;在Visual Studio团队资源管理器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我遇到了一个问题,我不得不忽略我最后一次提交,所以在我的命令行中,我做了以下操作:

git push origin --force

>

这可以正常工作,但是我通常会从Visual Studio Team Explorer中进行推送/拉取,但是我无法找到如何从此处强制推送



是否可以或只能从命令行完成?

解决方案

您可以在Visual Studio 2017中启用--force命令,如下所示:Open team explorer。


检查启用推 - 强制复选框,并应该像这样的技巧



更多信息请查看

PS。 此功能仅在Visual Studio 2017中可用


I recently had an issue where I had to disregard my last commit, so on the command line I did following:

git push origin --force

this works fine, however I normally make my push/pulls from inside Visual Studio Team Explorer, however I could not find out how to --force a push from there

Is it possible or can it only be done from command line?

解决方案

You can enable --force without using command prompt in visual studio 2017 as follows Open team explorer.

check the enable push --force checkbox and that should the trick like so

For more info check out this link

PS. This feature is only available in visual studio 2017

这篇关于如何使git push origin --force;在Visual Studio团队资源管理器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:44