https://github.com/ryanwalder/how-to-git
Git repo to show how to use fetch/rebase/review PRs like a boss
https://github.com/ryanwalder/how-to-git
git howto tutorial
Last synced: 4 months ago
JSON representation
Git repo to show how to use fetch/rebase/review PRs like a boss
- Host: GitHub
- URL: https://github.com/ryanwalder/how-to-git
- Owner: ryanwalder
- License: mit
- Created: 2018-10-12T12:08:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T22:44:49.000Z (about 5 years ago)
- Last Synced: 2025-04-04T00:02:34.734Z (10 months ago)
- Topics: git, howto, tutorial
- Size: 23.4 KB
- Stars: 1
- Watchers: 0
- Forks: 22
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# how-to-git
A repoo with some branches and some pull requests designed to show how to:
* Make good commits
* Not too much sausage (squash commits)
* Not too little sausage (splitt commits)
* Make good Pull Requests
* Review Pull Requests like a boss
* Use the Fetch & Rebase method of working (rather than pull)
Designed to be used in conjunction with my [How to git](https://docs.google.com/presentation/d/1_990RTb0fWJnp_0Z6sSUvCOn_dR2k2Ko5QEju753en4/edit?usp=sharing) slides.
## Notes
Obviously some of this is very opinionated. I am working to the following principles when making this guide:
### Good commit messages
[This post](https://chris.beams.io/posts/git-commit/) by [Chris Beams](https://github.com/cbeams) delves deep into what makes a good commit message and why.
### Good commits
We don't need to see how the sausage is made. A good commit should be the code needed for a single logical change. Nothing more, nothing less.
### Making pull requests
Much like the Good commits section above good Pull Requests make everyone's lives easier.
## Handy git settings
These are setting which improve over the base setup
### Always fast forward merge
As discussed in the slides, merge commits are ugly but that doesn't mean we can't still use the `merge` functionality of git.
By default merge will try and [fast-forward](https://sandofsky.com/images/fast_forward.pdf) commits without creating a merge commit if possible but will create a merge commit if needed.
With this setting it means it'll throw an error rather create the merge commit which give you the chance to fix the thing causing the merge commit before it happens, keeping you log nice and clean.
```
$ git config --global merge.ff only
```