Learned Git and GitHub basics on Day 01 of my journey

🚀 Git & GitHub Crash Course: Day 01 Journey! Today, I kicked off my version control journey with Git and GitHub. Here’s a quick log of the essential commands and concepts I learned. 🎯 Core Workflow Git works in stages. I learned to move my files from my working folder to a "snapshot" in the repository's history: * Working Directory (Non-Staging Area): Where I edit my files. * Staging Area: A "waiting room" for changes I want to save. * Local Repository (.git): Where Git permanently stores the saved changes (commits). 💻 Day 01 Command Cheat Sheet * git init * What it does: Initializes a new, local Git repository in the current folder. This creates a hidden .git directory to track everything. * ls -al * What it does: A bash command to list all files, including the hidden .git folder. * git status * What it does: Checks the status of all files in the repository . * 🔴 Red text: Shows files that are untracked or have changes that are not staged. * 🟢 Green text: Shows files that have been added to the staging area and are ready to be committed. * git add <filename> * What it does: Moves a file's changes from the working directory to the staging area. * Example: git add demo123.txt * git commit * What it does: Takes all changes from the staging area and saves a permanent "snapshot" (a commit) into the local repository's history. * (This often opens the vim editor: press i to insert text, then esc + :wq to write and quit). * git commit -m "Your message here" * What it does: A shortcut! This commits the staged files and adds a descriptive message at the same time, skipping the text editor. * git log * What it does: Shows a complete history of all the commits you've made. Excited to learn more on Day 02! 🔥 #Git #GitHub #VersionControl #DevOps #Programming #Coding #Developer #100DaysOfCode #LearnToCode #TechJourney

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories