git init # initializes a new Git repository in the current directory
git clone <repo> -b <branch name> <folder name> # clones a specific branch from a git repository into a new directory
git status # 현재 branch file status 확인
git lg # shows git line graph
git log # shows commit log in current branch -> escape = :wq
git diff # shows differences between the working directory and the staging area (or index).
git diff head # compares the contents of the working directory with the latest commit.
git reset --hard <commit hash> # moves the HEAD pointer to a specific commit
git push -f origin master # forcefully pushes the current state of your local 'master' branch to the 'origin' remote
To make main branch look clean, use rebase in case of small group
1
2
git rebase master
git rebase --continue #after resolving conflict
in large group
use pull request - merge strategy.
developer just create new branch to add feature.
maintainer or director review the branch when merge with pull request