Using Tortoise SVN diff in TFS - visual-studio

I want to use Tortoise SVN diff utility with TFS. I know how to configure user tools in TFS. What I need is installer for Tortoise SVN diff utility. I think I need to install full Tortoise SVN to get SVN diff tool, is there a standalone version of this tool available for download?
I know various other diff tools are available like winMerge etc. but I am very much familiar with tortoise svn diff.

If you want to use Tortoise Merge with TFS. You need to install Tortoise SVN.
And then follow the steps here
Compare Command: C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe
Arguments:
/base:%1 /mine:%2 /basename:%6 /minename:%7
Merge
Command: C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe
Arguments: /base:%3 /mine:%2 /theirs:%1 /basename:%8 /minename:%7 /theirsname:%6 /merged:%4 /mergedname:%9

The TSVN diff tools are available separately.
See the download page, scroll down to "Tools".
Or directly from here.

Related

Git pull done but the packages are not seen in the solution explorer of Visual Studio

Me and my colleague are working on a project and I wanted to pull the SSIS packages from colleague's repo into my local repo. I did the git pull origin colleaguerepo
to pull from the remote and I am able to see all the files when I type in 'ls' . But when I open it in the Visual studio the files are missing. there were no error messages shown or any merge conflicts too.Could anyone help me on this matter?
Here are the summary of what I have done.
colleague pushed the local repo to remote.
I did 'git pull origin colleaguerepo'.
'ls 'in git shows all the files.
but visual studio does not show it.

Using "git submodule add" in native Visual Studio 2019

Is there a way to use the git submodule add command in Visual Studio 2019 without installing any add-ons? I use the GitHub tools provided by VS2019 and I would like to use just that and the built-in command line, but it seems that only some specific Git commands are supported...

Using LFS with Visual Studio 2017

I wan't to use Visual Studio 2017 (15.5) together with a Git repository which tracks some files with Git LFS.
I already have Git 2.15, which contains Git LFS, installed on the machine.
I've Visual Studio 2017 installed with only the following workloads and without the Git component since it already is available on the machine:
--add Microsoft.VisualStudio.Workload.ManagedDesktop
--add Microsoft.VisualStudio.Workload.NetWeb
--add Microsoft.VisualStudio.Workload.NetCoreTools
--add Microsoft.VisualStudio.Component.Wcf.Tooling
Visual Studio fails now to checkout branches from the repository since it cannot find Git LFS.
I assume this is because git-lfs.exe is not available on the path, and Visual Studio has its own Git instance in c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin\.
If I additionally install the standalone git-lfs installer, which makes git-lfs available on the path, checkout works on some machines but not on other (haven't found out what's the difference, maybe installation order or if it was a new installation or update of Visual Studio).
If I remove the c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\ folder everything works fine in Visual Studio, as it does use the Git version available from the path.
My questions are:
What is the supposed way to have Git LFS support in Visual Studio?
Is there a way to have Visual Studio using the Git Version on the path instead of installing its own instance
Does Visual Studio expect git-lfs on the path or should it also work with Git LFS installed through the bundled installer in recent versions of Git for Windows.
To get Git LFS working with Visual Studio 2017 (15.5.2) it requires Git LFS installed with the standalone Git-LFS installer. If Git LFS is installed with the Git for Windows distribution git-lfs.exe is not available on the PATH, and since Visual Studio has its own instance of Git, LFS functionality won't work.
It is also important to have Git LFS early in the path otherwise it won't be passed to Git by Visual Studio as the PATH passed to the Git instance run by Visual Studio is limited in the length. For example installing Git LFS after Visual Studio often ends with git-lfs.exe too late in the PATH.

Visual Studio TFS Git not seeing any changes

I'm not getting something about Visual Studio's Git for TFS.
I cloned a colleague's solution in Git on TFS and started adding code. I then realised that I needed my own branch for the changes I was making, and so following the instructions in Push a new local branch to a remote Git repo and track it too I ran
git checkout -b e4ctim
git push -u origin e4ctim
When I make changes to my code visual studio shows the familiar red-tick icon by the code file to reassure me that the change has triggered the file to be checked out:
And then when I save the file the Visual Studio returns the icon to the blue padlock. I assume that this change from red-tick to blue padlock signifies that the change has been checked-in locally in Git:
But when I look at the history of the modified file, there is none!
I would like to commit my changes locally and sync them with the TFS server.
Visual Studio does not see any changes at all:
From the command line I can see that Git has noticed all of my modifications by running the command
git status
and seeing lots of changes not staged for commit and untracked files.
Looing at the Git book I could use
git add
or more specifically
git add -u .
to stage the files ready for a commit but I'm reluctant to do that as the Develop your app in a Git repository (track, commit) Visual Studio documentation states:
Q: Where is the Git stage?
A: If you are an experienced Git user, you might have noticed that
Visual Studio handles changes differently than the command prompt.
You might have wondered if the Included Changes section contains
your staged changes. In fact, Visual Studio usually bypasses the Git
stage for you. When you commit changes, Visual Studio simultaneously
stages and commits them. The one exception occurs when you add a
file to your Git repository; Visual Studio does stage this kind of
change.
Visual Studio stages and commits changes simultaneously. But why is it not listing any of the modifications I have made to tracked files as changes, and thus letting me commit them?
This is more of a workaround than an explanation, but I found that if I ignored the documentation "when you commit changes, Visual Studio simultaneously stages and commits them" and instead added the modifications to staging with the command
git add -u .
then Visual Studio suddenly became aware of the modifications and let me commit them locally and sync them with the TFS server. Moreover it then put the 'new file' green cross on the files I had added and I found I could do another commit and then another sync to pick up the additions and deletions I had made.
Since then Visual Studio is doing what I would expect: when I make a change to the file the file is listed as changed in the commit window.
I still do not know why Visual Studio failed to pick up the changes until after an initial git add but at least it works now.
I had to add this line to my .gitignore:
[path to project]/node_modules/
Apparently VS2015 was crashing on some very long path in there and would just decide to give up all hope
delete the file myProject\.git\index.lock fixed it in my case.
I had the same probem and I realized the following:
In order to show the changeset, As #dumbledad said, Visual Studio runs the command
git add -u
internally for staging the updates.
If some of the files that you are trying to add to your changeset is open by another process, then the git command gets a permission error. And Visual Studio won't show the changes.
In my case, I had a document in my repo that was open by another application, and that caused Visual Studio not to show the modifications because of the Git permission error. So check if any of the files of your git repository is not open by any other application.
I'm using VS 2015 Update 1 and also meet this problem. Furthermore, at the same time, the VS' output window told me my VC.opendb file under the solution folder is occupied by another program. According to this, I fixed the issue of occupying: add *.VC.opendb and *.VC.db to the .gitignore file. Then everything goes well.
I was having the same issue with Visual Studio Update 3. VS was saving locally but not picking up any changes so I couldn't commit.
I downloaded Git for Windows from https://git-for-windows.github.io/ (thanks #fhilton), opened the Developer Command Prompt and changed directory to C:\Repos\Scheduler (the location of my source code).
I then ran GET ADD -U and received the following error...
error: open("WindowsServices\Scheduler.WindowServices.InstallLog"):
Permission Denied
error: unable to index file
WindowsServices\Scheduler.WindowServices.InstallLog
fatal: updating files failed
As others have said, it looks like the GIT tools in Visual Studio can fail silently, even for the most basic Windows level errors. Worse, it can tell you GIT is fully in sync. Command line is certainly your friend for the time being.
Open View > Output, select 'Source Control - Git' in Show Output from and check for any errors. As others mentioned, any error in Git makes MS Project silently ignore any changes.
I had this problem on a new machine with a fresh install of both VS2013 Update 5 and VS 2015 and it was driving me crazy. Then I found if I installed Git for Windows, the problem went away! https://git-for-windows.github.io/
Then i was trying to make changes but files doesn't get effected...There is a easy solution for this. The major problem is one of your git ignore files ignoring your files..
Open your local repo for instance D://repos, then look file you want
--> D://repos/project1/HomeViewModel.cs
--> Right click on it and click on Git Extentions
--> Choose +Add Files
--> then Force option
--> Click on Addfiles..Here you go you file will be added in changes
Helpful article! Using Git Bash (git add -u) helped me get closer to the cause of the problem. After committing changes previously not shown in Visual Studio, only half-way commit was done because of using a SQL Server Database Project; Apparently, Windows 10 started to add jfm-files in the same folder keeping it open all the time and preventing it from beeing accessed by VS. Solution was to add it to the .gitignore before committing.
See this thread for further information:
Visual Studio 2015 Database Project directory contains a file with extension jfm
In my case my problem was I am using Linux with symbolic links in the path to my projec (cannot tell if windows with symbolic links has the same problem)

Safe to update git?

Git for Windows was installed as part of Visual Studio 2013. I think it is version 1.8.3 if I remember correctly. There are newer versions available. Is it safe to update git or will internal setting of Visual Studio get corrupted?
I had Git for Windows installed before I installed VS2013. I've been running 1.9.4 the whole time and never had an issue with VS2013 interfacing with Git. Updating Git externally of VS shouldn't be a problem, most likely VS just interfaces with a known Git repository and doesn't have a dependency on the Git version it self. If the newer version of Git has a new feature you want to use and VS doesn't support it then VS won't break, you will just have to run the command through the Git instead of through the VS GUI.

Resources