One thing that you need to keep in mind is that all shell commands are case sensitive, so if you type ls it would not work. Note: keep in mind that the rm command would completely delete the files and folders, and the action is irreversible, meaning that you can't get them back. In case that I had to delete a folder/directory, I would need to specify the -r flag: rm -r ebook Let's say that I wanted to delete the README.md file, what I would have to do is run the following command: rm README. The rm command stands for remove and allows you to delete files and folders. Then I could use the cd command and access the ebook directory: cd ebookĪnd finally, if I was to run the pwd command again, I would see the following output: /home/bobby/introduction-to-git/ebookĮssentially what happened was that thanks to the pwd command, I was able to see that I'm at the /home/bobby/introduction-to-git direcotry and then after accessing the ebook directory, again by using pwd I was able to see that my new current directory is /home/bobby/introduction-to-git/ebook.
Git bash shell for windows tutorial full#
If I run the pwd command, I would get the full path to the folder that I'm currently in: pwd The pwd command stands for Print Working Directory which essentially means that when you run the command, it will show you the current directory that you are in. If I wanted to go back one level up, I would use the cd.
What I would need to do is to run the cd command followed by the directory that I want to access: cd ebook Let's say that I wanted to go inside the ebook directory from the output above. The cd command stands for Change Directory and allows you to navigate through the filesystem of your computer or server. If you are on Windows and if you are using the built-in CMD, you would have to use the dir command. Note: This will work on a Linux/UNIX based systems. mdįor more information about the ls command, make sure to check out this page here. In my case, the output is the following: CONTRIBUTING. The output will show you all of the files and folders that are located in your current directory. All that you need to do in order to run the command is to open a terminal and run the following: ls
The ls command allows you to list the contents of a folder/directory.
So before we get started, let's go over a few basic shell commands! The ls command It is important to know basic shell commands so that you could find your way around the terminal. As throughout this eBook, we will be using mainly Git via the command line.