Command Line Basics
1. Navigate to your Desktop and locate the Class Files > Git Class directory. Ensure the Hipstirred-website folder is visible in your file explorer. Keep this window open—you'll need it for the drag-and-drop technique we'll demonstrate shortly.
2. Access your system's command line interface using the appropriate method for your operating system:
Mac: Navigate to Applications > Utilities and launch Terminal.app. This is your gateway to macOS's underlying Unix system.
Windows: You have two excellent options. If you're comfortable with the native Windows Command Prompt and prefer its syntax, launch that application. For a more Unix-like experience that's particularly well-suited for Git operations, launch Git Bash—you'll find it as a desktop icon or in the Windows Start menu (often nested within a Git folder).
3. Throughout this tutorial, we'll use "terminal window" as a universal term referring to Terminal, Command Prompt, or Git Bash—regardless of which interface you've chosen.
4. In your terminal window, type cd followed by a single space. The cd command (change directory) is fundamental to command line navigation.
5. While you could manually type the complete file path to your destination folder, there's a more intuitive, visual approach that eliminates typing errors. Arrange your windows so you can simultaneously view both the Hipstirred-website folder and your terminal window—this setup is crucial for the next step.
6. Here's where the magic happens: drag the Hipstirred-website folder directly into your terminal window. The system will automatically populate the full path for you. Your command should now display something similar to this (note that your specific path will vary based on your system configuration and username):
cd /Users/dan/Desktop/Class\ Files/Hipstirred-website
7. Click anywhere in the terminal window to ensure it's active, then press Return (Mac) or Enter (Windows) to execute the navigation command and change to that directory.
8. To verify you've successfully navigated and view the folder's contents, use the directory listing command appropriate for your system:
Mac: Type ls and press Return. This Unix command provides a clean list of files and directories.
Windows using Git Bash: Type ls and press Enter. Git Bash emulates Unix commands for consistency.
Windows using Command Prompt: Type dir and press Enter. This is the traditional DOS command for directory listings.
Terminal Commands by Platform
| Feature | Mac/Linux | Windows Git Bash | Windows Command Prompt |
|---|---|---|---|
| List Directory Contents | ls | ls | dir |
| Change Directory | cd | cd | cd |
| Confirm Command | Return | Enter | Enter |
Setting Up Your Terminal Navigation
Open Terminal Application
Mac: Applications > Utilities > Terminal.app. Windows: Launch Git Bash or Command Prompt based on preference.
Prepare the cd Command
Type 'cd' followed by a space in your terminal window. Don't press Enter yet.
Use Drag and Drop Navigation
Arrange windows so you can see both the Hipstirred-website folder and terminal. Drag the folder into the terminal to auto-complete the path.
Execute and Verify
Press Return/Enter to navigate to the folder, then use ls (or dir) to confirm you can see the folder contents.
Tip: Bring up Previous Commands
Master this time-saving technique: press the Up Arrow key in any terminal to instantly recall your last executed command. Continue pressing Up Arrow to cycle through your entire command history. This feature is invaluable when you're repeating similar operations or need to modify a previous command slightly. Most modern terminals maintain extensive command histories, sometimes spanning hundreds of previous entries.
The Up Arrow key is universal across Mac and Windows terminals. Keep pressing Up Arrow to cycle through your command history - this works in Terminal, Git Bash, and Command Prompt.
Tip: Cancel the Current Command
Everyone makes typing mistakes—it's part of the learning process. When you need to abandon a partially-typed command and start fresh, press Ctrl+C (works on both Mac and Windows). This keyboard shortcut immediately cancels the current input and presents you with a clean command prompt. It's also useful for interrupting running processes that seem stuck or are taking longer than expected.
Essential Terminal Shortcuts
Cancel Current Command
Press CTRL-C on both Mac and Windows to cancel the current command and get a clean command line. This works when you make typing mistakes.
Navigate Command History
Use Up Arrow to access previous commands and Down Arrow to move forward through your command history.
Tip for Mac Users
Mac users enjoy an even more streamlined workflow for directory navigation. With your terminal prompt completely empty (don't type anything), hold the Cmd key and drag any folder directly onto the terminal window. The terminal instantly changes to that directory—no need to press Return or execute any additional commands. This Mac-specific feature leverages the operating system's deep integration between the graphical interface and command line environment.
Hold Cmd and drag any folder onto an empty terminal prompt to instantly navigate to that folder. No need to type cd, no need to press Return - the terminal automatically changes to that directory.
Mac Navigation Methods Comparison
| Feature | Standard Method | Power User Method |
|---|---|---|
| Steps Required | 4 steps | 1 step |
| Typing Required | Type cd + space | No typing |
| Key Combination | None | Cmd + drag |
| Confirmation Needed | Press Return | Automatic |
Go Beyond Git
Ready to expand your technical expertise? We offer a comprehensive curriculum of professional development courses designed for today's competitive tech landscape. Our classes maintain small cohort sizes, emphasize hands-on learning, and are led by industry experts with real-world experience. Explore our current offerings:
Available Course Categories
Web Development Courses
Learn full-stack development with hands-on projects and expert instruction in small class settings.
Python Programming
Master Python fundamentals and advanced concepts through practical coding exercises and real-world applications.
Data Science Training
Develop analytical skills and learn data manipulation, visualization, and machine learning techniques.
Web Design Programs
Create compelling user interfaces and experiences with modern design principles and tools.
All courses feature small class sizes for personalized attention, hands-on learning experiences, and expert-led instruction to ensure comprehensive skill development.