Git: Create Project

By Xah Lee. Date: . Last updated: .

Create a Project


# cd to the dir containing your code
cd xproject

# initialize. This creates a .git dir in the current dir. This dir holds all git's data about the current project.
git init

# add current dir (and subdir) files into git staging area.
git add .

# commit to local repository.
git commit -m"my first commit"

IMPORTANT: when using git, you should always cd to your project's directory first.


git FAQ