![]() ![]() l = (letter L, lowercase) = Use a long listing format (more info per item, arranged in columns, vertical listing) List the contents of the current directory (folder): $ ls a = Show Everything, including hidden items Git Bash: Show Directory Contents (ls) Syntax: In the above, the cd command is followed by a space, then two period with no space between. Git Bash: Navigating the File System (cd) Syntax:Ĭd Navigate to the Home Directory (Default folder for the current user): $ cd Navigate to a specific folder in the file system: $ cd /c/SomeFolder/SomeOtherFolder/ Navigate to a specific folder in the file system (if there are spaces in the directory path): $ cd “/c/Some Folder/Some Other Folder/” Go back to the previous Location: $ cd - Move Up One Directory Level: $ cd. In the above, we do type either the square or angle brackets. User Inputįor our purposes here, when we are presenting command syntax examples, we will denote user-provided values between angle brackets: $ Command In the above, we do type the square brackets. When portions of a command are optional, we will note this by enclosing them in square braces: $ Command For Example, the common command to change to another directory is cd. Cases and Spaces CountĪlso note that git Bash is case-sensitive, and spaces count. Items following a command which are not enclosed in brackets are required. The square brackets themselves are not typed into the command line. In the above, the square brackets denote optional parts of the command. The basic command syntax for a git Bash Command is: $ CommandName Typing only cd after the command prompt will always return you to the root level of the home directory. This folder is where Git Bash opens by default. In Windows, the default is your personal user folder. Git Bash assumes the existence of a “home” directory for each user. The file system in *nix systems is set up a little differently than in Windows. Personally, I just use quotes around strings in general. However, strings which contain spaces must be enclosed in quotes. ![]() When we are going to provide an input string with no spaces, we need do nothing. This is important when using Git on a windows system, because we need to mentally map the familiar Windows directory notation to Unix format: Windows Directory Path
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |