GIT - Cheat Sheet

Source: Edureka Published Version: 1.0 Git (most of us know to some extent), is a freely available, distributed and decentralized version control system that helps developers to collaborate with multiple people on their projects and makes their life easy. A few of the git commands including basics and advance are listed below; # initial setup git init git clone # ignore Untracked files git status / git status -uno git branch git branch prod # will show remote branches as well git branch -a # delete a local branch git branch -d <branch-name> git branch --merged git checkout prod # create a new branch with current branch code and checkout on that git checkout -b <branch-name> git pull git pull origin prod git fetch git pull = git fetch + git merge # add file to index/stage for commit git add . git add <folder-name>/* # remove file from index/stage git reset <file_path> / git restore --staged <file_path> # to view changes in workin...