Updated Branching Merging (markdown)
parent
9543a9f647
commit
f634de32f3
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
Git history is similar to code in that it is written once but it is read dozens of times. Therefore we optimize for readability. It should be clear what happened, by whom, when, and ideally why.
|
||||
|
||||
## Start all work in a new branch off of master
|
||||
|
||||
```
|
||||
|
@ -16,6 +18,10 @@ git rebase origin/master
|
|||
|
||||
## Clean up your commits before creating a PR
|
||||
|
||||
When working locally, do whatever you want. Before sharing, clean up your history into logical commits and write good commit messages for them.
|
||||
|
||||
*Tip: make lots of small commits, then squash them into one or several bigger commits before pushing. This helps organize your work, so that logically separate changes can be placed into separate commits without manually splitting an existing commit*
|
||||
|
||||
```
|
||||
git fetch
|
||||
git rebase -i origin/master
|
||||
|
|
Loading…
Reference in a new issue