Create a Repo
Last updated
Last updated
In this section, we will create an empty local repo.
From now on, it's assumed that you know the basic Linux commands in the Bash shell. If you're using a Mac or Linux you can open the terminal. If you're on Windows, you can download which bundles up the Linux commands.
Examples will be simulating a Python project. Feel free to try your own content.
First, navigate to an empty folder. This is where you will put your code and work mostly. Here, I will be using a folder called git-prj
under my D drive. Note that the prompt is λ and the command is whatever follows. For example, this is the input and output of pwd
, which prints the working directory.
If we do a list now, there won't be any files
Now use git init
to tell Git to make this folder a repo, meaning Git will start tracking this folder.
If we list now, you will find the .git
folder. This is where Git stores all the tracking information. On Linux, files started with a dot is hidden so include -a
to show all files.
You don't need to interact with .git
directly. The Git commands will do all the work.