ACTIVITY #4 Git Fundamentals Documentation on Hashnode.com
To check your Git version, simply run the command git --version
in your terminal or command prompt.
To configure Git globally, use the commands git config --global
user.name
"Github Username"
and git config --global
user.email
"
your.email@example.com
"
, replacing "Github Username" and "your.email@example.com" with your actual GitHub username and email address.
Can you explain how to configure Git globally with my GitHub username and email?
Is there a way to set up Git using my actual GitHub account information?
What commands should I use to personalize my Git configuration with my GitHub details?
The git init
command is the foundation for using Git to track your projects. It transforms a directory into a Git repository, allowing you to start managing your project's history and collaborating with others.
The git status
command is your go-to tool for checking the current state of your Git repository. It provides a snapshot of your working directory, showing you which files have been modified, added, or removed, and which changes are staged for the next commit.
The git add .
command is crucial for staging changes in your project before committing them to the Git repository. It tells Git to include all the modified or new files in your working directory in the next commit.
The git commit -m "Initial commit"
command is the core action that saves your staged changes to the Git repository, creating a permanent record of your work.
The git log
command is your window into the history of your Git repository. It allows you to see a chronological list of every commit that has been made, providing valuable insights into how your project has evolved over time.