DEV Community

Cover image for Git And Markdown Basics
Byali Macqueline
Byali Macqueline

Posted on

Git And Markdown Basics

GIT AND MARKDOWN
GIT
This is the most popular version control system in the world. It records and tracks changes made in code overtime in a special Database called Repository.

A version control system can either be centralized or distributed. Whereas a centralized version control system has advantages, it is not that efficient because of its single point of failure. Examples of centralized version control system include;-subversion, team version.

Therefore, the distributed control version system is better. Examples here include; -git -Mercurial Git is the most popular because it is free, open source, supernatural and scalable.

Using Git
There are different ways we can use git. Some of these ways include;

         -The command line 

         -Code editors and IDEs 

          -Graphical User Interfaces
Enter fullscreen mode Exit fullscreen mode

In this, we have an extension we can install and use, called Git lens -GUI interfaces for example GitKraken, Sourcetree. At the end of the day, we use the right tool. And thus we commonly use the command line. Some of the commands used include;

-git --version; used to checkout the version of git you are using.

-git init; used for initialization of git.

-git status; checks the status of the files in the folder your in. It shows whether these files are being tracked or not.

-git add . ; For all the untracked files, this command adds such files such that they can be tracked(monitored) during commit to the repository.

-git commit - m "message"; save all the changes that have been made.. m means the message you would like to send as a "heading" to your folder in the repo.

-git branch-m Main; makes sure that everything goes to the main branch.

-git remote origin url; at the url point, you copy and paste in the url for the repository from ,say, Github.

-git push -u origin main; when you want to push everything to the branch.

We prefer to commonly use the command line hence write commands in git Bash. To use this we have to first customize Git after installing it with your username and email. We can specify these settings at different levels as stated below;

-System; settings here would apply to all the users.

-Global; The settings here apply to all repositories of the current user.

-Local; The settings here apply to the current repository only.

Each commit contains a complete snapshot of the project and this helps us to easily go back and check or access the previous version of the same project.

To remove all files, we can use ; git rm.

TOOLS WHICH USE GIT
Github

Bitbucket

Gitlab

GITHUB
This is a tool which works on git.

 Basic Understanding of the power of git Git as a version controlling system.
Enter fullscreen mode Exit fullscreen mode

If you were building a website, with different versions starting from version,v1 . As time goes on, you keep modifying your website hence advancing to higher versions, that is, v2 and v3. After coming up with version, v4 of this project, the website certainly fails to load the webpages and seems faulty probably due to the new changes made . This is where the power of git comes in to play. Using git checkout v3**, you can remove all the modifications made on v4 and be able to access a working website of v3 again. Thereby, this making git, a version controlling system.

MARKDOWN Readme.md;
This is like a conclusion of whatever is inside your repository. It is a summary of what is inside the repository. A repository is a folder which has or stores all your content. Just like a database.

Symbols here include;

-hashtag symbol for headings respectively, that is ; #h1, ##h2,###h3 ,######h6 ,h for making h italic ,h for making h bold ,h for making h have a strike through or one can call it for deletion of h message used for links -Then for images in markdown, we use; > alter text

CONCLUSION: We can use these symbols when writing a readme.md in github to show a summary of all the content we have pushed in a give repository.

Github

Linkedin

dev.To

Top comments (0)