Monday, June 8, 2015

Visual Studio Git

Visual Studio provides Git tools and will automatically detect the presence of a local Git repository even if you have set it up using command line tools.  I suggest continuing to use the command line tools if you are comfortable with that.  It can be confusing when you start editing a file that you are tracking with Git.  All of a sudden there is a check mark next to the file in Solution Explorer.  What just happened?  The answer is nothing.  Visual Studio can compare the file with the most recent commit in the repository and it is just letting you know that the file has changed.  If you were to click the Commit button in Team Explorer (remember, I prefer the command line tools), Visual Studio would first stage the files (git add) and immediately commit (git commit) them.

No comments:

Post a Comment