We are using TFS with GIT for source control.
I am trying to pull the latest version but am having issue with dll files being out of sync.
I have done the following;
Tried to pull the latest commits from the team explorer menu. I then get the message;
An Error Occurred: 33 uncommitted changes would be overwritten by the merge
Pull completed with conflicts. Resolve the conflicts and commit the results.
Git repositories do not handle binaries well. Git is optimized for text files, which it can effectively diff and compress. Binaries cannot be diffed and compressed, so they cause the repository to bloat -- Git has to store the entire binary every time you commit a new version of it. This causes the repo to become massive and slow to clone, as well as having a huge negative impact when switching branches.
The correct way to handle assembly references is to use a package manager to allow binaries to be restored at build time, not committed to source control. This also gives you additional flexibility around managing versions of assemblies.
For other types of binaries (such as images), Git LFS allows you to use effective blob storage for your binaries, while still keeping the repository lean and consisting only of easily-diffable/compressible text. TFS 2015 Update 2 supports Git LFS, but earlier versions do not.
That said, you definitely should set up a .gitignore
file (if you don't have one already) to make sure your bin
and obj
folders are not in source control; they absolutely should not ever be in source control; it makes no sense. If you have a bunch of old commits polluting your history, you can remove them with a tool like BFG, but be aware that it rewrites the history of your Git repo, which may cause problems for other team members. It's something that you should do, but should be carefully coordinated with the rest of the team to make sure no one hits any problems.