I have recently installed Git onto a Dev Server that is our Dev TFS Build agent (Server 2012 R2). When I run a command line git through remote connection, it shows git commands. However, when I run a command line build step on the TFS website, git is not a recognized command. I checked the env path variables and they're fine.
Later, I tested by making my personal computer a build agent. The build step does succeed and it recognizes git. What is the difference with the server?
Restart the build agent so it picks up changed path environment variable.