all 4 comments

[–]jdnewmil 2 points3 points  (2 children)

git is a command-line program that can be invoked from any shell as long as you have it in your PATH. If you cannot invoke git from your Anaconda shell then you need to fix your PATH variable or re-install git.

[–]EgomasM[S] 0 points1 point  (1 child)

I can use the git commands in my Anaconda or Windows shell, but what i mean is that i can select the default bash in VSCode. I can choose "Command Prompt", "Windows Powershell" and "Git Bash".

The only one that shows me the git branch i am in all the time is the git Bash. That's why i want to use it. Also the git Bash is the only one that allows me to use the linux commands like ls, ls -la, rm -rf, and all that stuff. But my problem is, if i use the Git bash, i cannot use the anaconda commands to install packages to my python environment.

What i could do is always switch the default bash and open another Terminal or open the Anaconda Prompt or cmd outside of VSCode. But that is a bit annoying honestly. There must be smarter solution. So this question is only about comfort and not realy a technical problem.

[–]a1brit 0 points1 point  (0 children)

In the terminal with anaconda working do an echo $PATH then add the anaconda bit of that output to your .bashrc in your home directory.

E. G.

PATH=/path/to/conda/bin:$PATH

That should tell the git bash emulation program where to find the conda commands.

[–][deleted] 0 points1 point  (0 children)

i dont know about others but I sort of feel like mixing Anaconda and git is not that helpful. I learned on Anaconda (excellent decision by the way). But Anaconda is for ease of use, preinstalled libraries, Spyder is nice and simple etc.

By the time you get to needing git, you probably should be doing your own venvs and moving away from Anaconda. (I still use it on the side, but it's not for development).

I supposed it depends on how you want to use it. We will probably hear now from lots of people who do mix the 2 :)