VSCode doesn't recognize Git installed on OS X

My vscode on El Capitan says can't find any git but I had a couple of gits that are by apple and brew.

When I type which git on terminal, it says /usr/bin/git it's apple's(git v2.10). I'd like to use brew one /usr/local/bin/git (v 2.17) but vscode recognized neither.

I added this line to the last line of my ~/.bash_profile then vscode began to work.

export PATH="/usr/local/bin:/usr/bin/git:/usr/bin:/usr/local/sbin:$PATH"

After then, the terminal answered to which git -> /usr/local/bin/git. The order of the $PATH was important.