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.
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+ **