Added extra arguments configuration field.Added ability to add extra arguments to be placed before the compared file names. ![]() Recreated VSIX project for VS2017 version.Added validation of compare tool file path on configuration save.Added validation error if compare tool file path does not exist on compare.Updated Newtonsoft.JSON reference to 13.0.2.Tested with SourceGear's DiffMerge as well, and should work with most file comparison utilities. Configured to use Beyond Compare 4 by default at %PROGRAMFILES(X86)%\Beyond Compare 4\BCompare.exe. Shift or Ctrl Click on Two Files, Right Click, and Compare FilesĬonfigurable by a "Configure Compare Files." menu item under the Visual Studio Tools menu. Will also spawn a compare for subtype files if both files have subtype files, for example. The configured third-party comparison tool will come up show a diff between the two files. When you are done exploring and want to go back to your branch, you can choose to discard your changes by checking out an existing branch or choose to keep your changes by creating a new branch first.Control click any two files in Solution explorer and then right click and select "Compare Files.". Now that you are in a detached head state, feel free to run and test your code or even explore and commit changes. Meaning that the HEAD of your repository is going to point directly to a commit instead of a branch. Visual Studio shows a confirmation dialog explaining that by checking out a commit you will be in a detached HEAD state. To checkout a previous commit in Visual Studio, open the Git Repository window, right click on the commit you would like to go back to and select checkout (–detach). In this case, you can just checkout the tip of the remote branch that you would like to review. That way you don’t need to create a local branch if you are not planning on contributing to it. It can also be helpful if you would like to review code from a remote branch (a colleague’s branch, for example). For example, it allows you to go back to a previous point in your repository’s history where you can run or test your code. If you prefer an inline diff, you can use the diff configuration options gear and switch to an inline diff view.Ĭhecking out a commit can be beneficial in multiple ways. When you find a commit that you want to focus on, select the Open in New Tab button to open the commit on a different tab. You can browse though any local or remote branch without having to switch your branch. The Alt Up arrow key or Alt Down arrow keyboard shortcuts allow you to jump between these sections. For example, the previous screenshot shows the changes that one commit introduced to the Files.csproj file. You can check the changes that a commit has introduced by selecting them, which shows a difference. Local History shows the rest of commits tracked by your local repository.Ĭommit: Selecting any commit in the Graph section opens its details.Outgoing shows your local commits that you still haven't pushed.Incoming shows incoming commits that your team has been contributing.Graph: This section visualizes the state of your branch. If you're working on multiple features at the same time or if you want to explore ideas without affecting your working code, branching can be helpful. The Git Repository window contains three main sections, as numbered in the preceding screenshot:īranches: Git empowers users to multitask and experiment with their code through branches. You can also access the Git Repository window by selecting the outgoing/incoming links in the Git Changes window and on the status bar. To get started, open the Git Repository window by selecting Git Repository on the View menu. You can work remotely with the Git provider of your choice, such as GitHub or Azure DevOps. For example, you might need to get a good picture of what your team has been working on or maybe compare two commits to investigate a bug. But there are times when it makes more sense to focus on your Git repository. ![]() The Git Changes window provides a seamless way to interact with Git while coding without having to switch away from your code. ![]() ![]() Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
0 Comments
Leave a Reply. |