Introduction to Git , Github and Markdown

Introduction to Git , Github and Markdown

Have you ever wondered how to maintain a progress while coding a huge project with numerous files? I am sure you would have atleast heard someone talk about Git. Yes, Git makes every developer's job to maintain code simple. Lets see more in detail in this Article .

GIT

Git is a version control system. Version control, the name explains it all. It helps maintain multiple code versions of our progress in development without worrying about the code getting lost or corrupted.

Due to some many more benefits of Git , each and every developer feel it as a blessing to have when something goes wrong with their local system.

So, what else do we need to get started with Git?

  • Create a account in GitHub ( Easy with the best UI )
  • Install Git from official website.
  • Configure it in GitBash with Authentication of our Git Account
$ git config user.name "Your_Name"
$ git config --global user.email "Your_Email"

Pushing Code into Git:

There is a procedure to be followed to push our code to Git. Lets understand what each step means.

For the first time :

  • Initialise the Git
git init
  • To add README file to describe about the project
git add README.md
  • Commit message for a particular commit is added using the below command. Usually commit messages are added to know what exactly the commit is made and to identify certain changes.
git commit -m "first commit"
  • All changes to be added to main branch and rename the current branch to main.
git branch -M main
  • Add the changes from local and to be moved it to remote.
git remote add origin https://github.com/username/.git
  • To push the code to main branch
git push -u origin main

For every other time:

git add .                           \\to add all the changes
git commit -m "first commit"         \\commit message
git push                              \\push all the changes to repo

To make anyone who visits your repo to understand what is being developed , we would need a README.md file mandatorily added in all repos. Lets see how we would add content in md file,

Markdown:

Title:

  • #Title - h1
  • ##Title - h2 (No. of # - depends based on heading levels)

Italic , Strikethrough & Bold:

  • -Text- -> used for Italics
-  **Text**   -> used for Bold
~~ Strike ~~  -> to Strike any text

To add a link in md file:

[Name of link](url)

Images: - Images can be added similar to link in the below format:

![Name of image](url)

Tables:

|  heading | heading  | heading  |   
|---|---|---|---|---|
| data  | data  | data  |

Highlight text:

To highlight a text ` is used


`text` is highlighted

Code :

A snippet of code can also be added using ``` three backticks between the code snippet.

Quote:

quoted a sentence like .. >text

List:

  1. First item
  2. Second item
    1. sub item
  3. Third item
  4. Fourth item