Last week we released version 16.6 Preview 2 of Visual Studio 2019. It contained the first iteration of a revamped Git experience to improve your productivity when working with code on GitHub, Azure Repos, and other hosting services. You can learn more about how to use the entire Git feature set in Visual Studio in our new documentation.
You can enable or disable the experience by searching (Ctrl+Q) for preview features. In the Options window, just toggle the checkbox for the New Git user experience. We acknowledge that the functionality is still incomplete, with more enhancements coming soon. But we do expect this to be the default experience in the future. So in the meantime, we’re depending on you, the community, to let us know what we should prioritize in order to build what you need.
Turning on the new Git user experience in Preview Features
Initialize and Push
You can now initialize a local Git repository and push it directly to GitHub, Azure Repos, or other remote hosting services (e.g. BitBucket, custom Git servers, etc.) with a single click. If you have an existing project online, you can use the built-in GitHub and Azure Repos browsing experiences to clone your code.
Initializing and pushing a repository to GitHub
Create new branches
Once your repository is initialized, we want to enable you to focus on your daily development workflows without having to leave your code. You can create branches and commit code changes from the new Git menu and the Git tool window.
Creating a branch and committing changes
Manage branches
Context switching between tools and applications can be a pain. So we’ve added the ability to manage your branches from within the Git tool window. After working on your new feature or bug fix, use the branch dropdown in the Git tool window to check out, merge, rebase, view history, rename, and delete your branches.
Merging a branch and deleting it
Resolve merge conflicts
We understand collaborating with your team and sharing your work is very important, especially so in the current climate with increased remote work. When it comes to keeping your code up to date, this can be done easily using the fetch, pull, and push shortcuts in the Git tool window. But even when you do your best to stay in sync with the latest code changes, running into merge conflicts is sometimes inevitable. With the improved experience, we’ve started to make it easier to navigate through and resolve your merge conflicts.
Resolving a merge conflict
Please Share Your Feedback
This is just the beginning of a new first-class Git and GitHub experience in Visual Studio. Please add or vote for suggestions on the most important functionality that you want us to build or change.
Also be sure to keep these reference images handy for a quick overview of the new Git interface.
And finally – stay safe, stay healthy.
This seems like a big downgrade from Team Explorer, especially for DevOps users. The functionality you need for managing source control is now split across a menu and a pane, when before it was altogether in one place. For instance, in Team Explorer it's easy to switch to Branches and all the common stuff you want to do is right there (create a new branch, checkout a branch, merge/rebase branches). Plus, it always prompts you...
How can I see the old Synchronization info? Like if I do a fetch, how can I see what I’m going to pull in, or if I’m doing a push of multiple commits, how can I see what’s in there?
I really miss viewing a list of outgoing /incoming commits, and also the branch list. The current branch list being only available in a dropdown format is really depressing.
The branches in the dropdown also do not show which are synced to remote or not - before that was available by seeing the icon next to the branch.
Also, I find myself missing the color differences between "Added" and "Modified" as I'm now left with...
In previous version I could see my outgoing commits (commits that not pushed to remote) changes when I click “Sync” tab. I can only see three arrows to fetch/pull/push in new experience. How to view outgoing commits?
We’ve not implemented that functionality yet in the new experience. It’s on our backlog though! Please add your vote here – https://developercommunity.visualstudio.com/content/idea/975504/display-all-commits-not-yet-pushed-to-remote-branc.html
Please, please, please add a way to turn off Git in VS. It’s 100% the source of the slowdowns and crashes that I have. I don’t understand why it’s such a difficult thing to do?
Yep yep yep we’re working on that. It’s trickier than it sounds because of all different ways that source control gets activated within Visual Studio. You can add your voice here – https://developercommunity.visualstudio.com/content/problem/586075/visual-studio-2019-its-impossible-to-turn-off-the.html
One great feature I would love is: adding at the end of the cursor’s line information about the latest commit that affected it. VSCode’s GitLens add-on has this and it’s amazing.
My short feedback:
– I miss the branch overview (-> “Manage branches”)
It was easy to find
It shows all branches easily
It shows me which branch was already pushed or pruned
I was hoping this new Git window will land at 16.6, but unless I’m missing something, I don’t see it. When can we expect to see it in GA releases?
Hi Tsahi – Nope you’re not missing anything. That was the original plan, but there was a lot to build so we made the call that the feature set was not GA ready for 16.6. We’re working on adding functionality and polishing some rough edges to make it a more complete experience based on customer feedback. And the updated plan is to release as a feature flag toggle in 16.7 GA. Stay tuned!
Hi, how can I completely disable GIT extension. It consumes too much CPU, mainly when checking on background. There are several issues open (like this: https://developercommunity.visualstudio.com/content/problem/586075/visual-studio-2019-its-impossible-to-turn-off-the.html) and none solved.
Regards,
Mauro.
Thanks for bringing that up. It’s on our radar to fix!
Even though it is an underrated feature, any plans to support Git Rerere (Reuse Recorded Resolution)?
Thanks!
So there are no plans as of now. But please submit a feature suggestion at https://aka.ms/vsfeedback! You never know, there might be more folks who want support for it, and voting will definitely help us prioritize it. 🙂