[MUSIC]
>> Hello, my name Teyseer and today I would like to talk to you
about what's new with our Git tooling in Visual Studio 2022.
The first new feature I am excited about is multi-repo support.
Visual Studio 2022 better supports
cross-team collaboration by enabling you
to seamlessly work in a solution
with projects hosted on different Git repositories.
You no longer need to switch between repositories
or use different instances of Visual Studio.
To get started,
just make sure that the feature flag under
Tools Options is enabled for multi-repo support.
Once you do that, you can start by loading your solution,
and Visual Studio will
load the solution and activate all of your repos.
You can also go to
Solution Explorer and see that both of your solutions are there,
and the status bar is indicating that
both repositories are active.
You can also get started by adding projects to your solution.
As long as your projects are under Source Control,
your Visual Studio will detect them.
You can also click on the feature branch on
the status bar which would open the Git repository window.
As you can see, both of my repositories are
showing their like where I can browse and see my comments.
Now to demonstrate how multi-repo works in Visual Studio,
let's add a new method on
our math library and then consume
that method in our multi-repo calculator project.
As you can see, I am under the math library.
I have the SimpleMath.cs document open,
and I have just pasted the multiply method.
Now let's go to the program.cs.
If we go to the Git changes window,
we'll be able to see that the changes we made are
shown for both of the repositories.
We can also filter and focus on
a single repository using
the repulsive drop down or choose to view
both repositories and be able to
commit our changes across these two repos with a single step.
We can see the confirmation confirming that we have been
able to commit across the two repositories.
If we click on the "Outgoing", "Incoming" link,
we'll be able to see our command in
the outgoing section for both repositories here.
The Git repository window also supports network operations,
so I can click on "Push"
to push my changes that I have just committed,
and I get the conformation.
The Git repository window also supports
creating new branches and even checking out
a branch which is becoming quicker
as we have been improving the performance of Visual Studio.
I can also focus on a single repository and push
my changes through the Git changes window on the site.
The second feature I'd like to demonstrate is about how easy it
is to create Git repositories in Visual Studio 2022,
and add your code to GitHub and/or Azure DevOps.
For those of you who haven't been using Git,
let me just say that tracking
your progress with Git is very helpful even
if you are the only developer in
your organization and don't need to collaborate with a large team.
As we can see here,
Visual Studio is providing me with
an option to add to source control in the status bar,
indicating that this new project
I'm on is not tracked by source control.
If we go to the Git changes window,
I also get an option to create a Git repository there.
For those who are new to Git,
I highly recommend that you view our documentation.
Now let's get started by creating
our Git repository by clicking the "Create Git Repository" button.
As we can see, Visual Studio pre-populates
our Git repository dialogue.
The only thing we need to worry about is provide
an optional description and then create and push to GitHub.
It is important to note here that by default,
the repository we are going to be
creating is going to be private,
which means that the only one
who is going to be able to view your code.
If you would like to create
a Git repository on Azure DevOps instead,
just use the Azure DevOps option on the side,
which will also pre-populate the form for you.
The only thing you'll need to
adjust is the project that you would like
to create a new repository to and then create and push.
As we can see now,
Visual Studio is working on creating and
pushing our code to Azure DevOps.
Once that is done,
I get a conformation that it has
been successfully created and pushed.
I hope you've found this talk useful.
Feel free to view other talks about Visual Studio 2022.
Thank you and have a wonderful day.