Git: Create Project
Create a git repository in current dir. This means, make the current dir git version controlled.
This create a directory named .git
in current dir.
The .git
directory holds all git's internal data.
Example:
# 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.