how to make git push origin --force ; in Visual Studio Team Explorer

痞子三分冷 提交于 2019-12-01 13:58:50

问题


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?


回答1:


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

Team Explorer>Settings>Git>Global Settings

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

For more info check out this link

PS. **This feature is only available in visual studio 2017+ **



来源:https://stackoverflow.com/questions/45879374/how-to-make-git-push-origin-force-in-visual-studio-team-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!