Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git and Jupyter Notebook in Anaconda

I am working on my python skills by learning git, and have a few questions. I use Anaconda 3 in Windows for now.

  1. One way I install git is through anaconda prompt: conda install git. It does something, but I am not sure how to launch git?

  2. If instead I install git bash from here, what is the relationship between 1. and 2.?

  3. I wanted git to interact with Jupyter notebook, like in this video, so I can push directory to github. It looks so easy in Mac system but not Windows. Can I achieve what he did in the video by Jupyter in Anaconda and git bash downloaded from 2.?

like image 606
RyanKao Avatar asked Oct 12 '25 23:10

RyanKao


1 Answers

  1. conda install git installs git into "pkgs" of Anaconda distribution. For me after running this command the git binary appears inside: "c:\ProgramData\Anaconda3\pkgs\git-2.17.0-hb9891f8_1\Library\bin\git.exe". This git verison can be used from the Anaconda Prompt which looks like this:

enter image description here

  1. If you install the official Git setup, then you will have 2 separate installations of git. This is a completely separate package that gets installed into "c:\Program Files\Git\bin\git.exe" by default. Those 2 git versions might conflict if you tell the setup to modify your %PATH% variable, or choose to integrate git (or Anaconda) tools into your system "cmd.exe" prompt. As long as you don't do it, they should both be completely usable at the same time from either Anaconda Prompt (1) or git-bash prompt (2).

  2. Yes, on macOS git is integrated into the system command prompt by default. On Windows you have an option: either to integrate it or not. I'd recommend to not integrate and use git-bash prompt instead. You can fully use all of the git commands from git-bash prompt (c:\Program Files\Git\git-bash.exe), which looks like this:

enter image description here

like image 172
battlmonstr Avatar answered Oct 14 '25 15:10

battlmonstr