Git bash Commands

In this article, we will learn how to use git commands with Visual Studio Code Editor
for Python. It is the continuation fifth article of "Zero To Hero In Python" series .



Commands for Git bash



Some import commands are given below:

1. Change Directory (CD): Change from one directory to another directory cd and directory name.

Syntax: <correntdirectoryname> cd <changedirectoryname> : // 

Example: Suppose I am currently working in E directory and I want to go in F directory. Use below command.



 In above snap shot you can see that I am currently working in e directory now want to go inside F directory.


2. Make Directory: This command is used for create a new directory.
Syntax: $mkdir <directory name>

Example: $ mkdir HelloPython press enter. Now our HelloPython directory is 
created. See below snapshot.


Go inside created directory and use cd command. 

Cd HelloPython








How to create file .

touch: This command is used for create file.



Syntax: touch <fileName>

Write Code  in above created file.

Code(): This command is used for open file and write anything.

Syntax: Code <filename> 



After write above command default TestFile is opened. 



Navigate a specific folder:

Syntax: $ cd /Foldername/AnotherFolderName/


Example:

$ cd E://Projects//GoogleMap


Back to the previous location use below command.

Syntax: $ cd -


Go back single directory use below command.

Syntax: $ cd ..



Example: $ cd ..



Remove specific file from current directory.

Syntax: $ rm -"Removefilename"


In next article we will see variables on Python.

No comments

Powered by Blogger.