__Success is the sum of small efforts, repeated day in and day out.
π±β¨ππͺ
π Step 1: Initialize the Git Repository
git init
This command initializes a new Git repository in your project folder. In my case:
F:\24MCR074>git init
Initialized empty Git repository in F:/24MCR074/.git/
π Step 2: Add a File to the Staging Area
git add 24MCR074.txt
This stages the file so it's ready to be committed. Think of this as putting your changes into a box to be sealed and labeled.
ποΈ Step 3: Commit Your Changes
git commit -m "Added Personal Details"
This saves your changes to the local repository with a message
π©Ί Step 4: Checkup Time-Using git status to Monitor Changes
git status
This shows the current state of your working directory and staging area.
π°οΈ Step 5: Check Your Commit Log
git log
This command shows a log of all commits made:
π Step 6: Connect to GitHub
git remote add origin https://github.com/nisanthg1010/24MCR074.git
This links your local repo to a remote GitHub repository.
![GitHub repository successfully linked]
πΏ Step 7: Rename the Branch
git branch -M main
I renamed my branch from master to main, which is now the common default.
π Step 8: Push to GitHub
git push -u origin main
This command uploads your code to GitHub:
π Summary:
Version control made simple, smooth, and stylish. π―ποΈ
Youβre now GitHub-ready and good to go! ππ
From solo coding to global collaboration β Git bridges it all. ππ€
Push with pride. Your code has a home now! π‘πΎ
Every line committed is a step closer to excellence. ππ§
Youβre not just coding, youβre crafting history. π οΈπ
_Behind every git status is a developer leveling up. π§βπ»π‘
Keep checking, keep growing! π±π
_
π Letβs Take A Quick Look at the Code You Used:
git init # Initializes a Git repository in your project
git add <file> # Stages the file for commit
git commit -m "message" # Commits your changes with a message
git status # Checks the status of your repository
git log # View your commit history
git remote add origin <repo_url> # Links your project to GitHub
git branch -M main # Renames your branch to 'main'
git push -u origin main # Pushes your local changes to GitHub
The only way to do great work is to love what you do. β Steve Jobs
ππ Keep coding and commit to success!
Version control is not just about saving your code. Itβs about saving your future. β Anonymous
β³π Your past and future projects are secured, one commit at a time!
The best way to predict the future is to create it. β Abraham Lincoln
ππͺ Youβre writing your own Git story β letβs make it legendary!
Top comments (3)
super bro
Excellent work
its Asome