LEARN ABOUT THE GIT AND GIT HUB WITH A NEWBEE

#02

This is krish a 'newbee' still learning about Git and Github . In this blog I'll try my best to explain whatever i know about git and github in the way I learned .

What is git and github ?

Git : 

Git is a tool that helps us to track down the changes we made in  our codes by saving each changes in different versions. (For our understanding lets say the unchanged code as version 1 and the 1st changed or edited code as version 2 .) 

    It will be saved locally i.e.,within the computer 

Git doesn’t save your work automatically — you have to tell it when to save a version. Here’s how it works:

  1. You make changes to your files (like editing code or adding new files).

   2.You tell Git to save those changes by giving the command in the git bash .

The command:
git commit -m "your message here"

Git will then save a version of your project. You get to decide when to save (or commit) your work!

Github : 

  • Github is a web source where we store and share our code online . 
  • Just like Git , we have to save manually in github too by giving a command in the git bash after we make changes .
  • Steps to save changes to GitHub:

    1. Make changes to your files (like editing code).

    2. Commit the changes locally with git commit -m "your message".

    3. Push the changes to GitHub with the command :

      git push

    So:

    • git commit saves locally.

    • git push sends those changes to GitHub.


 Take a look at the table below for better understanding

🔹 FeatureGitGitHub

What is it?  A tool/softwareA website/platform

Where is it used?  On your computer (offline)On the internet (online)

Main job   Tracks changes in your codeStores and shares code online

Who uses it?   Just you, on your machineYou and others (team/collab)

Saves changes?   Yes, locallyYes, remotely (online)

Needs internet?    ❌ No✅ Yes

Commands used   git commit -m"your message"         git push

Visual interface?   No (mostly command-line)Yes (a full website)

Comments

Popular posts from this blog

LEARN HTML WITH A NEWBEE