Checking the Status of a Git Repository
git status command is used within a Git repository to its current status including the current commit, any modified files, and any new files not being tracked by Git.
The output of
git status can vary widely, and it often includes helpful messages to direct the user to manage their repository. For example,
git status will show the user the files they would commit by running
git commit and the files they could commit by running
git add before running
Initializing a Git Repository
git init command creates or initializes a new Git project, or repository. It creates a .git folder with all the tools and data necessary to maintain versions. This command only needs to be used once per project to complete the initial setup. For instance, the code block sets up the home folder as a new git repository.
$ cd /home $ git init