Git Version Control & Configuration Management
Objectives:
Create a Git (or GitHub) account
Set up and configure a Git repository
Upload artifacts to the repository
Use Git for version control and basic configuration management
Prerequisites:
A computer with Git installed (run git --version to check)
Basic command-line knowledge
Step 1: Create a GitHub Account
1. Go to https://github.com
2. Click Sign Up
3. Fill in required details and verify your email
4. Log in to your new GitHub account
Step 2: Create and Configure a Repository
1. After logging in, click + in the top-right corner → New repository
2. Set:
o Repository name: my-first-repo
o Description: (optional)
o Choose Public or Private
o Check Initialize with a README
3. Click Create repository
Step 3: Clone the Repository to Your Local Machine
1. Open your terminal
2. Run the following (replace <your-username>):
git clone https://github.com/<your-username>/my-first-repo.git
cd my-first-repo
Step 4: Add Artifacts (Your Project Files)
1. Create or copy files into the repository folder, e.g.:
echo "Hello Git" > hello.txt
mkdir src
echo "print('Hello')" > src/app.py
Add files to Git:
git add .
Commit your changes:
git commit -m "Add initial project files"
Push to GitHub:
git push -u origin main
Step 5: Make a Change and Version It
1. Modify hello.txt:
echo "Version 2 update" >> hello.txt
2. Stage, commit, and push:
git add hello.txt
git commit -m "Updated hello.txt with version 2"
git push origin main
Summary:
You now have a GitHub repo with version control
You’ve uploaded files, made changes, and tracked them with Git