GIT UltimateGuide
GIT UltimateGuide
Configuration
┣ Set user name: git config --global user.name "Your Name"
Repository Setup
┣ Create new repository: git init
Basic Workflow
┣ Check status: git status
Stashing
┣ Save changes to stash: git stash save "Message"
Tagging
┣ Create annotated tag: git tag -a <tag-name> -m "Message"
┣ Discard all changes since last commit: git reset --hard HEAD
Miscellaneous
┣ Show commit history: git log
Git Flow
┣ Initialize Git Flow: git flow init
Git Hooks
┣ Client-side hooks: .git/hooks/
Advanced Workflow
┣ Rebase: git rebase <branch>
┣ SourceTree
┣ GitKraken
┣ Git Extensions
┗ TortoiseGit
┗ Show who last modified each line of a file: git blame <file>
Best Practices
┣ Keep commits small and focused
Resources
┣ Official Git website: https://git-scm.com/