Blog Details

img
Data Science

How do I create a Git project in Python

Spoke Right / 17 Nov, 2023

As we have installed download git-bash, vscode and python. Now its time to integrate python git-bash with vscode.


  • Open the vscode
  • Click on extensions icon and type python in search box and select very first option of python which is recommended by Microsoft select and click on install button. 
  • After completion of installation, click on reload button.
  • After the completion of installation, you need to copy the following code

“terminal.integrated.shell.windows”: “C:\\Program Files\\Git\\bin\\bash.exe”


  • Now on top-left corner click on file>preferences>settings
    On right side you will see a pane named as user settings u need to put that copied code between the { } . refer to following image .
    (note: in python {} are known as the placeholders). 
  • Now close all of the screens by click on X button, and press ”cntrl + ~” key to open terminal .
  • You can see in terminal, it will be displaying as bash. By default our shell is power shell.python integration with git
  • Here you can change your color theme by going to file>preferences>color themes.


Why we chose vscode only?

Like as we have already discussed there are lots of other IDE available, which are quite easy to use like pycharm or Jupiter notebook. But in normal scenario, we create a file in file explorer then create .txt file and change extension into .py and open them in our IDE. This is not a good practice for professional programmers. We are using vscode so that we can create file using linux terminal command and to save time from traditional scenario. linux is easy to use and friendly for professional programmers and gives you full control to use your pc And all the users can easily use in any Os. All of the commands will be same.

  • Like following example, We changed our drive by cd command then created test.py file and running my file test.py. we will cover all commands in upcoming chapters. 


It is important to learn linux because every IT professional should have knowledge of linux basic commands. Most of the IT companies use linux in their companies.

0 comments

Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0