Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio how to open file and not diff window in team explorer changes git

Before commit my file on git, I want edit my file, but when I click on the file in the changes window in team explorer, it open the diff of previous file and current file, but how to open juste the current file, for edit it. Because in large solution find file is not easy. Thanks.

like image 520
ArDumez Avatar asked Apr 27 '17 07:04

ArDumez


People also ask

How do I open Git Changes window in Visual Studio?

Install Git for Windows, Git Extensions (optional) or TortoiseGit (optional). Start Visual Studio. Go to top menu "Extensions | Manage Extensions", search the online gallery for Git Tools and install. Select top menu "Extensions | Git Tools | Git Changes" to bring out the Git Changes Window.

How do I see the Git diff code in Visual Studio?

Viewing diffs# Our Git tooling supports viewing of diffs within VS Code. Tip: You can diff any two files by first right clicking on a file in the Explorer or OPEN EDITORS list and selecting Select for Compare and then right-click on the second file to compare with and select Compare with 'file_name_you_chose'.

How do I get the Git menu in Visual Studio?

Can you see "Add to Source Control" in lower right corner of Visual Studio window? If yes, click it and then click Git.

How do I commit changes in Git using Visual Studio?

Just enter your commit message and then select Commit All. The equivalent command for this action is git commit -a . Visual Studio also makes it easy to commit and sync with one click by using the Commit All and Push and Commit All and Sync shortcuts.


2 Answers

It really was not easy to find in VS 2017:

  • Go to the Team explorer window
  • Changes tab
  • Click on '...' button near Changes accordion
  • select Open file as default action

Git open file as default

like image 142
s_tranquil Avatar answered Oct 03 '22 00:10

s_tranquil


I've found way to: press SHIFT + double-click. This provided me with alternative behaviour of opening files in VS 2019 Community Edition

like image 26
Van Ng Avatar answered Oct 02 '22 23:10

Van Ng