THE FOUR AREAS: INTRODUCTION
We will focus on the Git
"way of thinking".
The Four Areas: Introduction
The Four Areas: Basic Workflow
The Four Areas: git reset
The Four Areas: Advanced Tools
History: Exploring the Past
History: Fixing Mistakes
Finding Your Workflow
If you have trouble following
this section, then watch
"How Git Works" first.
If you could follow this
recap, then move on
with this training.
git rm is not the
opposite of "git add".
Git automatically finds out
when you're renaming
or moving files.
commit
merge
rebase
pull
....
reset moves the current branch,
and optionally copies data from
the Repository to the other areas.
Git is a toolbox.
git show HEAD^
git show HEAD~2
git diff HEAD..HEAD^^
git blame recipes/apple_pie.txt
git log --graph --decorate --oneline
git show HEAD
Never rebase shared commits.
The Golden Rule:
never change shared history.
Be careful when you
revert merge commits.
"revert" doesn’t mean "undo".
git commit --amend
git rebase -i
git reflog
git revert HEAD
This is a module about Git
workflow patterns.
What a Remote Is
Pushing to a Remote
Pulling from a Remote
Peer to Peer Model
Centralized Model
Pull Request Model
Dictator and Lieutenants Model
Many projects use a mixed
Distribution Model.
Integration Branch
Release Branch
Feature Branch
Hotfix Branch
Distribution Model
Branching Model
Constraints
Don’t "just use GitFlow".
Don’t design a workflow.
Instead, grow it.
Distribution Model
Centralized
Branching Model
One Integration Branch (master)
One Feature Branch per Feature
Constraints
Keep master stable, fix it ASAP if it breaks
Integrate Feature Branches every few days
Use merge over rebase by default
"Simple, clear purpose and principles give rise to complex and intelligent behavior.
Complex rules and regulations give rise to simple and stupid behavior."
Now you're thinking in Git.
Thank you!