From the course: Programming Foundations: Version Control with Git (2020)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up a local repository

Setting up a local repository

From the course: Programming Foundations: Version Control with Git (2020)

Start my 1-month free trial

Setting up a local repository

- [Instructor] Before we can do anything with Git, we need to first create a repository. I usually designate a main folder to hold all my projects, then create individual project folders inside. Let's use the Git Projects folder we made earlier to hold all of our exercises. First, let's make sure we're in the correct directory. Use the PWD, Print Working Directory command, to check where you are. The output tells me I'm currently in my Git Projects folder. If you're not in the Git Projects folder, cd into it first. Here's a little trick for changing directories. First, type cd and space, then drag the folder into Terminal and press Enter. I find this technique especially useful for avoiding typos or for typing out long directory paths. Also, notice that when we see the full path for nested directories, each one is separated with a forward slash. This isn't 100% using the command line since I'm using the GUI to drag the…

Contents