Visual Studio Merge Changes In Merge Tool Missing - visual-studio

I taken branched from master branch. While I work on branch, other developers worked on master branch. While merge operation branch to master branch, i saw multiple conflicts. I wanted manual merge but missing "Merge Changes In Merge Tool". There are just Keep Target Branch Version and Take Source Branch Version buttons. What can i do for issue?
PS : This issue, there are just .cs files.

If it's only for .cs files merging would probably been disabled.
In Visual Studio go to Team Explorer > Settings
Under section Team Project Collection > Source Control you can manage file extensions an the enabling of file merging.

Related

How to Branch and keep the branch history with TFS 2013

I need to create a branch in TFS and copy the code and the history from the parent branch.
I am using TFS 2013 with Visual Studio 2013, is there a way to easily do this ?
Branching is a technique for creating a parallel set of versions of your files. So the branch will have the same codebase as parent branch.
Regarding the history, the file will keep the history under the branch change, check the screenshot below:

How to convert a deleted regular directory into a branch in TFS?

I'm in the middle of migrating a repository from TFS to Git, and I'm using git-tfs.
I've already converted my Trunk branch using 'git tfs clone ...' successfully. When trying to 'git tfs branch --init' a related branch it fails with the error message: 'error: TFS branches $/foo/myrelatedbranch not found!'
This seem to be caused by the $/foo/myrelatedbranch no being a proper tfs branch. The 'branch' documentation (https://github.com/git-tfs/git-tfs/blob/master/doc/commands/branch.md) seem to be pretty clear on the related branch having to be a PROPER branch (https://github.com/git-tfs/git-tfs/blob/master/doc/commands/branch.md#merge-changesets-and-branches).
The branch $/foo/myrelatedbranch has been deleted a while back, so I'm not able to see the option 'Branching and Merging -> Convert to Branch' in the Source Control Explorer.
Is there any way of making this deleted directory a proper branch in TFS?
Using Visual Studio 2015 and TFS 2015
You can configure the Source Control Explorer to show deleted items:
From the menu bar choose Tools, Options.
On the Options dialog box, navigate to Source Control, Visual Studio Team Foundation Server.
Select Show deleted items in the Source Control Explorer, and then choose OK.
If you now open the Source Control Explorer, you can view the deleted folder and convert the folder to a branch.
You can also rollback the changeset that deleted the folder. The rollback will create a new changeset where the changes are negated (so in this case, where the folder is added).
If the problem still exists, you could just take a snapshot of the latest version and migrate that to Git.

Tracking multiple sub-projects using Visual Studio 2012 git

I have been struggling with what (at least in my mind) should be simple:
I have two projects, the "MainProgram" and a "SubLibrary". Both were created with a Git Repository using the new Visual Studio 2012 Git support.
Both repositories work fine independently.
However when I "Add Existing Project"/SubLibrary to my MainProgram Solution, SubLibrary is not being "git-monitored" by Visual Studio at all - no overlaid status icons in Solution Explorer etc. - its just as if that project was not under source-control.
Through some research, I added a git submodule to the MainProgram repo, added the cloned version of SubLibrary project to the solution and .. the git-icons in Solution Explorer appeared!! ... but my joy was short-lived ..... No History, the status of changed files did not show in Solution Explorer. The changes were however picked up by TortoiseGit from within File Explorer.
The .gitmodules file looked OK (but as you can gather I am NO git guru!) .....
Surely it must be possible to have version control over multiple projects/repos within a single solution!
I would be very greatful if anyone could point me in the right direction!
In Git it is indeed usual to have smaller repositories. A typical repository will contain a single project while TFS and Subversion tend to have multiple projects in a single repository.
That will lead to the situation you described. Currently as far as I can see there is no git multi-repository support within Visual Studio (and TFS). It is simply not possible to have a single solution with multiple projects while each project resides in its own Git repository.
What I've done in the past:
I created a directory that served as the root
In that directory create a subdirectory for each individual project
Clone each git repository in its respective subdirectory
In a project use a file reference with a relative path to add references
(optional) create a single MSBuild file that builds all the solutions in its correct order. This way you can create a build using multiple Git repositories.
You won't have a single solution this way, but you will be able to track your changes in each individual repository.
Hope this helps you.

Git with TFS and exclusive checkouts

I would like some advice on how to use Git locally on my computer along with Visual Studio and a TFS server. Unfortunately the technical leader of my company has set TFS with the exclusive check-out policy and so every time someone checks out a file, it can't be edited by someone else.
What is the right way to make the two systems live together? I would try to use Git-TF but I'm not convinced with the checkin phase. The workflow should be as the following:
clone the project
switch to offline mode for Visual Studio
work offline with Git
fetch from the TFS server and rebase
check-in?
The problem is: how do I check-in my files if someone else has already checked out the files I need to change? How does Git-TF really work when checking-in files?
Another workflow that came to my mind, without Git-TF, could be the following:
open the TFS project
switch to offline mode
create a new branch with Git
work on the branch
return to the master branch, update it
exclusively checkout the files which have been changed on my Git branch
merge the branch on master
check in with TFS (after switch to online mode?)
What do you recommend?

Commiting changes accross projects in Visual Studio 2008 with Git Extensions

Imagine a solution in Visual Studio 2008 that consists of three projects. Two of them are file-system wise located under the solution home directory and a third one that has been added via Add Existing project from a location outside the solution.
The first two projects are part of the git repository covering the solution directory while the third one has its own git repository since it is simply a utility library shared accross several solutions.
My problem is that I can commit changes to git in Visual Studio by selecting a file or folder in one of the projects but I am unable to commit all changes to all projects by selecting the Root Node in the Solution Explorer. I am fully aware that this would imply a multi-repo commit performed by Git Extensions. But still does anyone know how to do this or is this simply not possible?
This is not possible since they are separated repositories.
The best solution that is available, is to add the second repository as a submodule to the first repository. This will not make committing any easier, but it will allow you checkout an old revision for both repositories, without manually having to find the corresponding commit in the second repository.

Resources