Visual Studio has come a long way since I used it last, and the Git integration is a powerful new addition. While the interface is a bit tricky to navigate, Linux command line makes you think in keywords not mouse clicks, overall it’s a great new feature that introduces an amazing source control system to the VS range. I’ve muddled my way through it for a while until this evening when out of the blue I received an error:
“The origin remote is set to fetch tags only (tagopt = –tags). This may be due to a bug in a previous version of Visual Studio Tools for Git. Fix my configuration or don’t prompt again.”
Clicking “fix my configuration” did nothing and there was no solution to be found. So going back to Git basics I took a look at the git config file – this will be in:
/.git/ folder (in your solution root folder)
and in the “config” (no extension) file.
Make a backup of the file (after closing VS) and scan down the file for:
tagopt = –tags
Remove this line (and this line only)
Restart VS and try again – you should nolonger receive “The origin remote is set to fetch tags only (tagopt = –tags). ” and your commits/pulls/merges should work just fine.
There’s no visual editor in Visual Studio Tools for the config file that I can see (please add a comment if this isn’t true) – so going back to core Git config is the way to go.
If there’s a better more VS way to resolve the The origin remote is set to fetch tags only (tagopt = –tags). Please comment below!