Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Creating a Git Repository

00:00 Now that you’ve installed and set up Claude Code and had a first look at it, it’s time to dive a bit deeper and create a little project with Claude Code.

00:10 So we will just be scratching the surface so you know everything to get started with Claude Code. We won’t go too deep. So the next few lessons will give you a first impression, and if there is something interesting for you, you have a starting point to go deeper. Here in the terminal, I am in my project folder, and as you learned before, you can invoke Claude Code by typing claude and pressing Enter.

00:36 Since you already granted code permissions through this folder, you are greeted by the little alien right away, and you can start with the prompt in the center.

00:47 And as you also learned in this video course before, this little prompt is kind of like a chat interface, so you can just tell Claude Code what to do.

00:58 I really like to start projects by creating a Git repository. That holds true for normal programming projects, but it’s even more important for Claude Code projects, in my opinion, or in general when you’re working with AI, because stuff can happen and you want to have an impression of what changed.

01:20 So it’s a good idea to commit your changes just like with normal programming and then see what changed over time in order to maybe revert some changes more conveniently, because what actually can happen during a session is that Claude Code changes a file repeatedly, and at some point you don’t know exactly anymore what changed.

01:40 So let’s create a Git repository first to then have the Git history, and instead of writing the command ourselves, let’s use Claude Code to start it.

01:54 Create a Git repository in this folder.

01:58 After you press Enter, Claude Code is trying to understand your prompt and then performing the command for you. Now, the command is not that complicated.

02:06 If you know a little bit about Git, you could have typed it yourself, but it’s nice to let Claude Code do some work. And that is actually something which comes in quite handy if you don’t really know the terminal commands for things.

02:21 So that is a very nice use case for a

02:25 terminal assistant like Claude Code. So Claude Code asks me if it’s okay to continue with git init, and that’s exactly what I want. So I say yes.

02:38 Perfect. So if you know a quick command in the terminal, you can also type this command yourself, because the downside of just telling Claude Code what to do is that you burn some tokens.

02:51 So depending on the subscription you are having, it can happen that you’re reaching your maximum faster. So if you know exactly the command that you want to run, it’s sometimes a good idea to just run the command yourself, and you can do so by typing the exclamation mark.

03:08 With the exclamation mark, you are entering the bash mode. And the bash mode is basically you are in the terminal and you’re typing something. So instead of closing Claude, typing a terminal command, and opening Claude again, you can use the exclamation mark.

03:24 So in this case, let’s type git status to see what the status of our repository is. With CTRL+O, we can toggle the transcription to see the full output and pressing CTRL+O again closes again.

03:39 Okay, perfect. One of the first things that you should do when you are working with Claude Code is make sure that you are working in a Git repository.

Become a Member to join the conversation.