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 [Link]
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 [Link]
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" > [Link]
mkdir src
echo "print('Hello')" > src/[Link]
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 [Link]:
echo "Version 2 update" >> [Link]
2. Stage, commit, and push:
git add [Link]
git commit -m "Updated [Link] 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