Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ajeebkp23/822881ca27d2892efc7cdbe63da8058c to your computer and use it in GitHub Desktop.
Save ajeebkp23/822881ca27d2892efc7cdbe63da8058c to your computer and use it in GitHub Desktop.
// Source http://stackoverflow.com/a/33787579
Visual Studio only sees git repositories if the .git folder
is used as the store for the git repository.
So, we can fake-out VS by using a different folder for the git store.
Rename the current .git folder to _git (.git dir may be hidden)
Create a text file in that same folder called .git containing
just the line gitdir: _git (make the file via command
line: echo gitdir: _git>.git)
Add _git to your .gitignore file
Now when you launch VS it will not see that
git repository and will use TFS instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment