Brain  Crist

Brain Crist

1595376000

Exciting new updates to the Git experience in Visual Studio

We’ve seen a lot of enthusiasm in the past few months with the improvements we’ve been making to the Git integration for Visual Studio 2019. We’ve also received a healthy amount of good feedback that’s helped us focus our efforts. We first announced the new changes in a blog post in March. Since then, the team has been hard at work analyzing the feedback, polishing the user interface, and building more features. We’re excited to share those updates with you today.

If you haven’t tried the new Git user experience in Visual Studio yet, download the latest Preview and you’ll get the newest updates to the experience by default. If you’re using the public Release of Visual Studio (version 16.6+), then hit Ctrl+Q to search and type in ‘New Git user experience’ to turn it on from the Preview Features pane of Tools – Options.

Image Tools Options Preview Features

New Git user experience Preview Feature flag

You can turn the experience off using the same checkbox.

Merge Conflict Resolution improvements

As we talked to customers about the pain points they face when working with source control, we consistently heard about the frustration with merge conflicts. When you get a merge conflict, it interrupts your coding flow and forces you to switch context. We also realized we needed better messaging to indicate you encountered a conflict during a Git pull operation. To address these concerns, the Git Changes tool window now clearly lists unmerged changes and displays a status message specifying that conflict resolution is in progress.

Image image of Git Changes window with unmerged changes

Merge in progress with conflicts (unmerged changes)

In addition, in our user studies, as we walked through different workflows, we noticed that not all developers always have the Git Changes window open. If you don’t, you’ll only see the file with conflict indicators and may try to manually resolve the conflicts in-line. We all know how painful that can be, especially for large files with many conflicts. So, we added a gold info bar at the document level to notify you when the file contains conflicts, prompting you to open the Merge Editor.

Image image of merge editor gold info bar

Gold info bar with link to open merge editor

The three-way Merge Editor has undergone quite a revamp based on ongoing customer feedback. We’ve changed the legacy TFVC terminology of _Source _and _Target _to _Incoming _and Current with a strong emphasis on the branch name. This used to be a constant point of confusion. Incoming and Current also each have a new checkbox to take all changes from either version with a single click.

Image Merge Editor Names

Incoming / Current and branch names in the Merge Editor headings

The Merge Editor now makes it easier to parse conflicts by better aligning matching lines, displaying word level differences, and making differing whitespace visible. We’ve also reduced the clutter around the zoom margin, health margin, and toolbar. Further, you can turn off non-conflicting differences to just focus on the conflicts. And if you don’t need the horsepower of the Merge Editor, such as in Add/Add conflicts, you can resolve those now at the file level with a two-way merge.

Image gif of merge editor

Merge editor experience

Brand NEW Git Repository window

After we launched the first version of the Git Changes tool window, we wanted to make sure we incorporated community feedback and suggestions as we iterated on the experience. Our research informed us there are specific Git operations most of you perform while coding that made sense in the Git Changes window adjacent to your editor. But other times, you need a full-screen experience to focus on a dedicated Git activity. So, in Version 16.7 Preview 3, we built the _Git Repository _window, the future home for all your Git related activities. It’s now available in Visual Studio Preview, with some initial functionality.

First, we built an interactive branch tree where you can manage all the branches in the repository in a single view. From here you can use the context menu to FetchPull, and Push branches without having to check them out. You can also create a new branch directly from any local or remote branch. We’ve also added the commands to ResetCherry-Pick, and Unset Upstream Branch, which weren’t available in the Git Changes branch picker.

In addition to using the power-packed context menu, you can also double click a branch in the list to show you its history in the right pane. At the top of the graph, you can see incoming commits after performing Fetch. Soon, you’ll be able to see outgoing commits as well. Double clicking on a commit will open its metadata in the Commit Details pane. You can access this window through the_ Manage Branches_ command in the Git menu as well as the Unpushed Commits button in the Status Bar.

This is just the first iteration of the Git Repository window and we will continue to build more features into it. But in the meantime, we’re eager for you all to try it out and let us know what you think.

Image Git Repo window

Manage branches and view history from the Git Repository window

Additional updates

Create a repository

You can now create a new repository on GitHub, Azure Repos, or any remote URL at any time, even from an empty folder. Visual Studio will help you initialize the new repository locally as well as push it to your remote GitHub account. Use the existing remote option to push your code to a hosted Git repository you’ve already created.

Image Create a new repo

Create a new repository and push it to GitHub

Git Settings

It’s super important to be able to personalize and customize your Git settings at a repository level as well as at a global level. We’ve migrated all your settings to Tools – Options – Source Control.

Image Image of settings pane

#visual studio #git #visual studio code

What is GEEK

Buddha Community

Exciting new updates to the Git experience in Visual Studio
Brain  Crist

Brain Crist

1595376000

Exciting new updates to the Git experience in Visual Studio

We’ve seen a lot of enthusiasm in the past few months with the improvements we’ve been making to the Git integration for Visual Studio 2019. We’ve also received a healthy amount of good feedback that’s helped us focus our efforts. We first announced the new changes in a blog post in March. Since then, the team has been hard at work analyzing the feedback, polishing the user interface, and building more features. We’re excited to share those updates with you today.

If you haven’t tried the new Git user experience in Visual Studio yet, download the latest Preview and you’ll get the newest updates to the experience by default. If you’re using the public Release of Visual Studio (version 16.6+), then hit Ctrl+Q to search and type in ‘New Git user experience’ to turn it on from the Preview Features pane of Tools – Options.

Image Tools Options Preview Features

New Git user experience Preview Feature flag

You can turn the experience off using the same checkbox.

Merge Conflict Resolution improvements

As we talked to customers about the pain points they face when working with source control, we consistently heard about the frustration with merge conflicts. When you get a merge conflict, it interrupts your coding flow and forces you to switch context. We also realized we needed better messaging to indicate you encountered a conflict during a Git pull operation. To address these concerns, the Git Changes tool window now clearly lists unmerged changes and displays a status message specifying that conflict resolution is in progress.

Image image of Git Changes window with unmerged changes

Merge in progress with conflicts (unmerged changes)

In addition, in our user studies, as we walked through different workflows, we noticed that not all developers always have the Git Changes window open. If you don’t, you’ll only see the file with conflict indicators and may try to manually resolve the conflicts in-line. We all know how painful that can be, especially for large files with many conflicts. So, we added a gold info bar at the document level to notify you when the file contains conflicts, prompting you to open the Merge Editor.

Image image of merge editor gold info bar

Gold info bar with link to open merge editor

The three-way Merge Editor has undergone quite a revamp based on ongoing customer feedback. We’ve changed the legacy TFVC terminology of _Source _and _Target _to _Incoming _and Current with a strong emphasis on the branch name. This used to be a constant point of confusion. Incoming and Current also each have a new checkbox to take all changes from either version with a single click.

Image Merge Editor Names

Incoming / Current and branch names in the Merge Editor headings

The Merge Editor now makes it easier to parse conflicts by better aligning matching lines, displaying word level differences, and making differing whitespace visible. We’ve also reduced the clutter around the zoom margin, health margin, and toolbar. Further, you can turn off non-conflicting differences to just focus on the conflicts. And if you don’t need the horsepower of the Merge Editor, such as in Add/Add conflicts, you can resolve those now at the file level with a two-way merge.

Image gif of merge editor

Merge editor experience

Brand NEW Git Repository window

After we launched the first version of the Git Changes tool window, we wanted to make sure we incorporated community feedback and suggestions as we iterated on the experience. Our research informed us there are specific Git operations most of you perform while coding that made sense in the Git Changes window adjacent to your editor. But other times, you need a full-screen experience to focus on a dedicated Git activity. So, in Version 16.7 Preview 3, we built the _Git Repository _window, the future home for all your Git related activities. It’s now available in Visual Studio Preview, with some initial functionality.

First, we built an interactive branch tree where you can manage all the branches in the repository in a single view. From here you can use the context menu to FetchPull, and Push branches without having to check them out. You can also create a new branch directly from any local or remote branch. We’ve also added the commands to ResetCherry-Pick, and Unset Upstream Branch, which weren’t available in the Git Changes branch picker.

In addition to using the power-packed context menu, you can also double click a branch in the list to show you its history in the right pane. At the top of the graph, you can see incoming commits after performing Fetch. Soon, you’ll be able to see outgoing commits as well. Double clicking on a commit will open its metadata in the Commit Details pane. You can access this window through the_ Manage Branches_ command in the Git menu as well as the Unpushed Commits button in the Status Bar.

This is just the first iteration of the Git Repository window and we will continue to build more features into it. But in the meantime, we’re eager for you all to try it out and let us know what you think.

Image Git Repo window

Manage branches and view history from the Git Repository window

Additional updates

Create a repository

You can now create a new repository on GitHub, Azure Repos, or any remote URL at any time, even from an empty folder. Visual Studio will help you initialize the new repository locally as well as push it to your remote GitHub account. Use the existing remote option to push your code to a hosted Git repository you’ve already created.

Image Create a new repo

Create a new repository and push it to GitHub

Git Settings

It’s super important to be able to personalize and customize your Git settings at a repository level as well as at a global level. We’ve migrated all your settings to Tools – Options – Source Control.

Image Image of settings pane

#visual studio #git #visual studio code

Visual Studio 2019: New Windows Terminal has arrived

Introduction

The new Windows Terminal has arrived on Visual Studio 2019 16.6 for Windows and Visual Studio 8.6 for Mac. In this article I will show how to enhance it with posh-git for a better experience with GIT commands.

Posh-Git

posh-git is a PowerShell environment for Git that provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repository status. Because The new terminal is compatible with PowerShell (and also classical command prompt) we are able to use them together for a better experience with GIT. Here is a tutorial to install it:

First, set the value of ExecutionPolicy to RemoteSigned for all users use the next command:

Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force

Then install it from the PowerShell gallery:

Install-Module posh-git -Scope CurrentUser -Force

At least update your PowerShell prompt with the following command:

Add-PoshGitToProfile -AllHosts

You can find here more documentation about it: https://github.com/dahlbyk/posh-git

Demo

Now you can open a new Windows Terminal from the menu here:

#visual studio #git #posh-git #visual studio 2019

Juanita  Apio

Juanita Apio

1618243440

[Guest post] Learn C# with Visual Studio, Visual Studio for Mac, and Unity

UPDATE: The book giveaway challenge is complete. We will be announcing winners on the Visual Studio blog within the next week. Thank you for your submissions!

Visual Studio is an amazing development tool. But Visual Studio and Visual Studio for Mac are more than just intuitive, state-of-the-art development environments. They’re also remarkably powerful learning and exploration tools, with features to help you create and understand your code. I love teaching and learning about C## with Visual Studio. That’s why my co-author, Jenny Greene, and I put Visual Studio and Visual Studio for Mac right at the center of our latest book, _Head First C# _(4th edition), published by O’Reilly Media. _Head First C# _incorporates Visual Studio directly in the learning. combining Visual Studio with the unique and innovative “brain-friendly” Head First approach to teaching helps us make learning C## easier and more fun for our readers.

#visual studio #c# #unity #visual studio 2019 for mac #visual studio for mac

Hermann  Frami

Hermann Frami

1617611280

Announcing the Release of the Git Experience in Visual Studio

We’re excited to announce that our new Git tooling is now the default source control experience in Visual Studio 2019, beginning with  version 16.8 . We’ve been working on this experience over the last year,  iterating based on your feedback  to build out key features, enhance performance, and fine tune quality. Above all, we’ve focused on improving discoverability for your common workflows and simplifying navigation to reduce context-switching. Regardless of whether you are part of a large team or working on a personal project, whether you are an experienced developer or just starting out, we strongly believe the  new Git experience in Visual Studio 2019  will have something for you. Here’s seven reasons why we think you should try it out.

Redesigned Git repository creation

To get started with Git, Visual Studio lets you add your local code to Git and GitHub with a single click. The Create a Git repository dialog contains the  new integrated GitHub sign-in flow, similar to what we offer for Microsoft accounts. Here, you can set the repository to be publicly visible or switch it to private. That makes it securely accessible to only you and any designated collaborators. In addition to GitHub, you can also push your code to an existing remote repository. This can be one you’ve already created on Azure DevOps or any other provider. And finally, you can choose to create a local-only Git repository if you are not ready to push to a remote host.

Image createrepodialog

Create Repository dialog

#visual studio #git #git integration #github

Madyson  Reilly

Madyson Reilly

1604109000

Best Practices for Using Git

Git has become ubiquitous as the preferred version control system (VCS) used by developers. Using Git adds immense value especially for engineering teams where several developers work together since it becomes critical to have a system of integrating everyone’s code reliably.

But with every powerful tool, especially one that involves collaboration with others, it is better to establish conventions to follow lest we shoot ourselves in the foot.

At DeepSource, we’ve put together some guiding principles for our own team that make working with a VCS like Git easier. Here are 5 simple rules you can follow:

1. Make Clean, Single-Purpose Commits

Oftentimes programmers working on something get sidetracked into doing too many things when working on one particular thing — like when you are trying to fix one particular bug and you spot another one, and you can’t resist the urge to fix that as well. And another one. Soon, it snowballs and you end up with so many changes all going together in one commit.

This is problematic, and it is better to keep commits as small and focused as possible for many reasons, including:

  • It makes it easier for other people in the team to look at your change, making code reviews more efficient.
  • If the commit has to be rolled back completely, it’s far easier to do so.
  • It’s straightforward to track these changes with your ticketing system.

Additionally, it helps you mentally parse changes you’ve made using git log.

#open source #git #git basics #git tools #git best practices #git tutorials #git commit