ACTIVITY #2 Git Fundamentals Documentation on Medium.com
Check Git Version
Command: git --version
This command checks the currently installed version of Git on your system.
Configure Git
Commands: git config --global
user.name "Your Name" git config --global
user.email "your.email@example.com"
These commands set your global Git username and email, which will be associated with your commits.
Initialize a Git Repository
Command: git init
This initializes a new Git repository in the current directory, setting up the .git directory.
Add Files to the Repository
Command: git add .
This command stages all changes in the current directory for the next commit.
Check the Status
Command: git status
This shows the current status of the repository, including which files are staged for commit.
Commit Changes
Command: git commit -m
"Initial commit"
This commits the staged changes with the message "Initial commit."
View Commit History
Command: git log
This command displays the commit history, showing all the commits made in the repository.
This documentation covers the basic steps of using Git for version control. Each step is critical for managing your project’s files efficiently.