-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Simplify Git in Visual Studio page #1652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 12 additions & 17 deletions
29
book/A-git-in-other-environments/sections/visualstudio.asc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,20 @@ | ||
| === Git in Visual Studio | ||
|
|
||
| (((Visual Studio))) | ||
| Starting with Visual Studio 2013 Update 1, Visual Studio users have a Git client built directly into their IDE. | ||
| Visual Studio has had source-control integration features for quite some time, but they were oriented towards centralized, file-locking systems, and Git was not a good match for this workflow. | ||
| Visual Studio 2013's Git support has been separated from this older feature, and the result is a much better fit between Studio and Git. | ||
| Visual Studio has Git tooling built directly into the IDE, starting with Visual Studio 2019 version 16.8. | ||
|
|
||
| To locate the feature, open a project that's controlled by Git (or just `git init` an existing project), and select View > Team Explorer from the menu. | ||
| You'll see the "Connect" view, which looks a bit like this: | ||
| The tooling supports the following Git functionality: | ||
|
|
||
| .Connecting to a Git repository from Team Explorer | ||
| image::images/vs-1.png[Connecting to a Git repository from Team Explorer] | ||
| * Create or clone a repository. | ||
| * Open and browse history of a repository. | ||
| * Create and checkout branches and tags. | ||
| * Stash, stage, and commit changes. | ||
| * Fetch, pull, push, or sync commits. | ||
| * Merge and rebase branches. | ||
| * Resolve merge conflicts. | ||
| * View diffs. | ||
| * ... and more! | ||
| Visual Studio remembers all of the projects you've opened that are Git-controlled, and they're available in the list at the bottom. | ||
| If you don't see the one you want there, click the "Add" link and type in the path to the working directory. | ||
| Double clicking on one of the local Git repositories leads you to the Home view, which looks like <<vs_home>>. | ||
| This is a hub for performing Git actions; when you're _writing_ code, you'll probably spend most of your time in the "Changes" view, but when it comes time to pull down changes made by your teammates, you'll use the "Unsynced Commits" and "Branches" views. | ||
| Learn about it by reading the official documentation: https://docs.microsoft.com/visualstudio/version-control | ||
|
|
||
| [[vs_home]] | ||
| .The "Home" view for a Git repository in Visual Studio | ||
| image::images/vs-2.png[The “Home” view for a Git repository in Visual Studio] | ||
|
|
||
| Visual Studio now has a powerful task-focused UI for Git. | ||
| It includes a linear history view, a diff viewer, remote commands, and many other capabilities. | ||
| For more on using Git within Visual Studio go to: https://docs.microsoft.com/en-us/azure/devops/repos/git/command-prompt?view=azure-devops[]. | ||
Binary file not shown.
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.