GIT
Vocabulary: GIT vs GITHUB
Section titled “Vocabulary: GIT vs GITHUB”What is Git ?
Section titled “What is Git ?”Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. (Wikipedia)
What is GitHub, Gitlab etc ?
Section titled “What is GitHub, Gitlab etc ?”GitHub, GitLab, Bitbucket, etc. are web-based hosting services for version control using Git. They provide a web-based graphical interface and access control, as well as several collaboration features such as wikis and basic task management tools.
GIT on Visual Studio Code
Section titled “GIT on Visual Studio Code”- Go to the
Source Controltab

Translated in commands :
# git init# git remote add origin URL_HEREgit add template/style.css # add the file to the staging areagit commit -m "[feature] add css" # commit the changesgit push # push the changes to the remote repository
- for the first push :
git push -u origin main
Basic GIT commands
Section titled “Basic GIT commands”Some GIT commands :
git init # create a new repositorygit clone <url> # clone a repository from the given <url>git add <file> # add a <file> to the staging areagit commit -m "<message>" # commit the changesgit push # push the changes to the remote repositorygit fetch # fetch the changes from the remote repositorygit pull # pull the changes from the remote repository
git status # check the status of the repositorygit log # view the commit history
git branch # list all branchesgit switch <branch> # switch to a <branch>git checkout <branch> # switch to a <branch>git merge <branch> # merge a <branch> into the current branchgit reset --soft HEAD~1 # remove the last commitgit bisect
Section titled “git bisect”git bisect is a command that helps you find the commit that introduced a bug by performing a binary search through the commit history. It allows you to quickly narrow down the range of commits to identify the specific commit that caused the issue.
git bisect startgit bisect bad # mark the current commit as badgit bisect good <commit> # mark a known good commit# git will checkout a commit in the middle of the range# test the codegit bisect good # if the commit is good# orgit bisect bad # if the commit is bad# repeat the testing process until the bad commit is foundgit bisect reset # reset to the original HEAD