What Is Git?
Git is a tool that helps you track changes in your files. It lets you save versions of your work and go back if something breaks.
GitHub is where your Git projects are stored online.
What Is Git Bash?
Git Bash is a terminal for Windows that allows you to use Git commands to manage your projects.
Starting a Git Project
Go to your project folder:
cd path/to/project
Start Git tracking:
git init
Tracking and Saving Changes
Check file status:
git status
Stage files:
git add .
Save changes:
git commit -m "My first commit"
A commit saves a version of your work.
Push Code to GitHub
Connect your project to GitHub:
git remote add origin git@github.com:username/repo-name.git
Upload your code:
git push -u origin main
Pull Updates from GitHub
Get the latest changes:
git pull origin main
Simple Git Workflow
- Edit files
- git add .
- git commit -m "message"
- git push
Conclusion
Git helps beginners manage projects safely and build a GitHub portfolio. Once you understand the basics, it becomes an essential everyday tool.
This article was written as part of my data analytics bootcamp to document my learning journey with Git and GitHub.
Top comments (0)