3. Prerequisites
Git Installed: Download Git and install it.
GitHub Account: Make sure you've created an
account (as covered earlier).
Code Editor: VS Code or any preferred code
editor.
4. Initial Setup
Go to the official Git website: git-scm.com
Click on Download and choose the appropriate version for
your operating system (Windows, macOS, or Linux).
Run the downloaded .exe file.
Keep the default settings unless you need specific
integrations.
Check if git is installed: git --version
8. Your First Repository: creating a folder
Open Terminal and create a new directory or
do it manually using GUI
mkdir my-first-repo
navigate too the newly created directory
cd my-first-repo
10. Staging and Committing Changes
Check Status:
• git status
Stage the File:
• git add index.html
To add all the files in our directory
• git add .
11. Staging and Committing Changes
Commit Changes:
• git commit -m "Initial commit with
index.html"
12. Making changes to the directory
Making changes to the directory e.g. creating
a new file or modifying an existing file
• Using git status, we can notice modified files
and new files that have been added to the
directory
13. Making changes to the directory
creating a new CSS file in our directory
echo "#the style file" > style.css
and modying index.html
14. Staging the changes made
use git add . to add the modified file and the
new file to the staging area
15. Commiting the changes made
git commit -m "added a css file and improved
the home page"
16. Setting Up and Generating an SSH Key for GitHub
ssh-keygen -t ed25519 -C "[email protected]"
After generating the key, got to C:Usersadmin.ssh
on the view tab tick the checkbox to view hidden items
Right-click on id_ed25519.pub
Select Open with > Notepad (or any text editor).
Copy the entire content of the file
17. Add the Key to GitHub:
Go to GitHub > Settings > SSH and GPG keys.
Click New SSH key.
Paste the copied key.
Give it a title (e.g., "My key").
Click Add SSH key.
Test the Connection: ssh -T [email protected]