DEV Community

tevijay
tevijay

Posted on

Getting started with GIT and GITHUB

What is version control system
Version control, also known as source control is the practice of tracking and managing changes to files. One of the most popular version control system is GIT

What is GIT
GIT is a free and open source distributed version control system useful for things like;

  • Tracking code changes
  • Tracking who made changes
  • Coding Collaboration

How To get started with GIT
To get started with git is as simple as watching the sunrise.
All you need to do is to go to their official website https://git-scm.com/download, download the suitable version for your OS and install the software.

What is Github
Github is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere
All you need to get started with git is to go to their official website and create an account

*GIT Configuration Commands

  1. git --version: This shows the current version of git you have installed
  2. git config --global user.name "your github username"
  3. git config --global user.name "your github email"
  4. git config --global list

Other Git commands
git init - used to initialize git into our code base

git status - This command tells us the status of our file

git add- For staging a filE or tracking changes in our files

git commit - Gives tracks of changes in our file. This is important because u might want to go back to a particular commit in future

git branch-Allows us to make different copies of our source code and make changes independent of each other

git clone- Creates a copy of an existing Git repository

git checkout - git checkout is a the means to navigate existing branches.It can also be used to check old commits and old file revisions

git clean - Removes untracked files from the working directory.

git pull- It downloads a branch from a remote repository, then immediately merges it into the current branch

git push - It lets you move a local branch to another repository, which serves as a convenient way to publish contributions.

Top comments (0)