a·gen·tic a·gil·i·ty

Uncommitted changes messing up your sync in Git with Visual Studio

Explains how uncommitted changes in Git can prevent syncing with the server in Visual Studio, and highlights key workflow differences from traditional server-based systems.

Published on
2 minute read
Image
https://nkdagility.com/resources/CuWpL0GPBwN
Subscribe

Sometimes when you try to Pull changes from the server to your local repository you get a “cannot pull because there are uncommitted changes”. This is uncommitted changes messing up your sync

I have been onsite in Athens working with a customer that is moving from StarTeam to Git. When you are moving from one source control system to another there are always difficulties and a difference in workflow between the systems. A workflow that works well in StarTeam might not in TFVC. However when you add that you are moving from a Server version Control System (SVCS) to a Distributed Version Control System (DVCS) you are going to go through a paradigm shift.

However, it can be the simplest of activities that bite you in the ass. For example, in most server based version control systems when you have made a bunch of changes locally and you want check-in to the server it is always prudent to do a “Get” first in order to verify that your local changes work with the latest version of the server. So you dutifully just do a “Get” and if your files locally conflict with the server you resolve the conflicts using the conflict resolution tools.

Uncommitted changes messing up your sync in Git with Visual Studio

When you try to do this in Git it complains that you have uncommitted changes that you either need to undo the changes and get rid of them, or you can commit them to the local repository.

In our server based scenario we have no choice but to do a merge from the server directly to our live edited files locally. If we complete the merge, and we messed up…. Well that’s just a little bit tough and you should have chosen better. So we have a lossey (or lousey) merge where we can potentially not end up with what we want and have no way back.

Git blocks this potential loss of code by forcing you to choose wither you want to lose the changes or persist them. Once they are persisted they can’t be lost without deliberately resetting the repository or deleting it. Although your workflow is changing it is for the better as you are less likely to have a frustrating issue.

DVCS is just better than SVCS…

Software Development
Subscribe

Related Blog

Related videos

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Sage Logo

Sage

Epic Games Logo

Epic Games

Workday Logo

Workday

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Trayport Logo

Trayport

Slicedbread Logo

Slicedbread

Microsoft Logo

Microsoft

ProgramUtvikling Logo

ProgramUtvikling

Capita Secure Information Solutions Ltd Logo

Capita Secure Information Solutions Ltd

Lockheed Martin Logo

Lockheed Martin

Cognizant Microsoft Business Group (MBG) Logo

Cognizant Microsoft Business Group (MBG)

Ericson Logo

Ericson

Boxit Document Solutions Logo

Boxit Document Solutions

Deliotte Logo

Deliotte

Hubtel Ghana Logo

Hubtel Ghana

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

Schlumberger Logo

Schlumberger

Washington Department of Transport Logo

Washington Department of Transport

Ghana Police Service Logo

Ghana Police Service

Nottingham County Council Logo

Nottingham County Council

Royal Air Force Logo

Royal Air Force

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Bistech Logo

Bistech

Freadom Logo

Freadom

Lean SA Logo

Lean SA

Lockheed Martin Logo

Lockheed Martin

DFDS Logo

DFDS

Hubtel Ghana Logo

Hubtel Ghana