Professional Documents
Culture Documents
Git Basics
Git Basics
Sudipto Das
What is Git ?
Conventional commits
https://www.conventionalcommits.org/en/v1.0.0/
Git Amend
Master
Stage
Develop
Feature
Bugfix
Hotfix
Git Log
.gitignore
git rm -r --cached .
git add .
Git commit -m “Gitignore fixed”
Git stash
git stash
git stash push -m “Named stash”
git stash push -u -m “Named stash”
git stash list
git stash apply 0
git stash pop 0
Git reset
Atomic Commit
Do not push to master directly
Don’t commit dependencies into source control
Configure the git authorship
Write descriptive and meaningful commit Don’t commit local config files into source control
Commit only related work Use reference number in your commit
Anything in the master branch is deployable Defined git workflow
Open a pull request at any time Don't mix refactoring with new feature
One Commit, one change
Use pull requests
One pull request, one concern
Do not commit generated file
Do not commit secret keys