Goal: Set up Git and learn basic commands.
-
Install Git:
- Download and install Git from git-scm.com.
-
Configure Git:
- Open your shell and set up your username and email:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
- Open your shell and set up your username and email:
-
Create a New Repository:
- Create a new directory for your project and initialize a Git repository:
mkdir git-challenge cd git-challenge git init
- Create a new directory for your project and initialize a Git repository:
-
Basic Commands:
- Create a new file called
README.mdand add some text to it. - Check the status of your repository:
git status
- Add the file to the staging area:
git add README.md
- Commit the file:
git commit -m "Initial commit with README"
- Create a new file called