# **GIT AND GITHUB** Git is a distributed version control system (we can call it a tool) that helps developers track their code base, colaborate with others and manage multiple versions. It is a version control manages, controls, organises and tracks changes. It is a decentralized system meaning every developer has a full copy of repository(repo) in their local machine without the need of a central server. version control is the practice or act of tracking and manages to software code. it allows devlopers to work on it individually. key featuers 1. It is a decentralised system 2. version tracking 3. Collaboration 4. Branching 5. Merging 6. Remote repositoryExtensive tooling 7. Staging area 8. Speed (its fast and efficient) 9. open source and free 10. it has a large community.(everybody or developer uses Git) Github is the platform that host git repo. To start using git, you need to install it on your local machine and configure it. '`git config --global user.name "Your Name"`'' '`git config --lobal user.email "your email.com"'` working Dir - Staging area - local repo - Remote repo Terms used in git(git commands) * git init : to initialze a new repo(working directory) * git add : to add it to staging area * git commit : commit it to local repo on local machine. * git push : to push to remote repo * git pull : to pull from remote to local machine * git status : to check status on git * git commit -m "message" : messsage could be my initial commit. * rm rf git : to remove anythind that was added on local repo * git add . : to add all changes * git log : shows you all your commit(author, date, and time) * git commit -an "Added task6" : to add and commit at the same time * git add index.html &&git commit -m 'Added task name of task' : after running the command, run git push * Branching is creation of a new/seperate version of the main repo. Branches allows you to work on a repo without making an impact on the main repo. `git branch about us` Merging is when you are done with the content in the branch, you create a pull request. meaning to create or effect the change in the master branch. `git checkout master switch to branch 'master'` Dot git ignore files : When one has something that he doesn't want to push to remote `.env` you create a file and name it .git ignore then put the .env in it.