I have an odd use case that I'm trying to find the answer to. We use to have straight TFS for our source control, specifically TFS 2015. All of the projects have been converted into Git repositories, but they're still stored in TFS in a separate Collection. What I'm trying to do is look at the check-in history for a user across all projects. I've found this question on it already, but all of the answers don't seem to work with Git. Even in Visual Studio 2017, which is more Git friendly.
Taking Team Foundation Sidekicks as an example. If I point it at our archived TFS Collection it'll see all of the projects in there. But if I look at the Git Collection it shows up as empty.
Knowing how Git works I strongly suspect TFS is only being used as a storage mechanism at this point. It can look up the check-in history for each project when you're looking at only one project, but it's doing so by executing git.exe or doing something similar. So it really has no knowledge of what's going on within each project. But figured I'd ask anyway in case I'm wrong, or someone has another idea about how to do this.
To view commit history which committed by a certain user, you can use any of below options.
Open the Git repo in Code Hub of your TFS web page -> History Tab -> select a branch -> Advanced search -> select the user -> Find.
Then you will get the commit history which made by the user on a certain branch.
Note: Filter commit histories made by a certain user in Web page is branch separated. So you need to select each branch separately. If you want to show all the commit histories across branches which made by a certain user, you can use the way as option 2 listed.
If you have not cloned the TFS git repo locally, you can clone first by git clone <repo URL>
.
Then in the local git repo, you can get all the commits which made by an user from all branches by any of below commands:
git log --all --author="username" #Show commits made by the user for all branches
git log --all --oneline --author="username" #Show each commit for one line
git log --oneline --decorate --graph --all --author="username" #Keep branch structure