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
From the course: Programming Foundations: Version Control with Git (2020)
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
-
-
-
-
(Locked)
Using the command line1m 17s
-
(Locked)
Command line basics4m 15s
-
(Locked)
Configure Git settings3m 11s
-
(Locked)
Setting up a local repository3m 1s
-
(Locked)
Setting up a remote repository3m 43s
-
(Locked)
Adding changes with Git add and commit4m 50s
-
(Locked)
Keep repositories up to date with Git pull and push3m 34s
-
(Locked)
Deleting a repository or branch29s
-
(Locked)
Challenge: Putting it all together1m 31s
-
(Locked)
Solution: Putting it all together5m 39s
-
(Locked)
-
-