Git
Version control is awesome and learning investing time upping your git game is such an underrated skill to have.
Notes
Commit as often as you can. Ideally after each micro-iteration, when something new is working.
This way, at the end of the day you can just rebase the whole branch and squash all of the micro-commits in a whole commit implementing the whole new features.
Good git workflow to make changes to new projects: clone, fork (
hub fork
), 'git checkout -b my-feature', work, commit, 'git push -u woodrowpearson my-feature', work, commit, 'git push'.If you’re doing things right, there’s only two kinds of branches anyways, master and feature branches. Feature branches can be squashed and rebased off master (minimizing the issue of merge conflicts and making for easier management of the commit history) and merged to master from there without requiring further conflict resolution. (Trunk-Based Development)
A Git branch is just a pointer to a commit. Git commits, however, also contain the hash of the parent commit(s), so by referring to that commit you also refer too all ancestors.
Squash + rebase (for feature branches) are good for PRs. No one cares that it took you 20 tries to get the feature right, what matters is what went into the pull request, which is usually one commit.
Links
Github Flow - Found this recently & for teams in 2020 I don't think there is another resource that better explains what good git work flow should look like.
Git Book - The git bible
Gitbase - SQL interface to Git repositories.
Gitea - Easiest, fastest, and most painless way of setting up a self-hosted Git service.
gitbatch - Manage your git repositories in one place.
Conventional Commits - Specification for adding human and machine readable meaning to commit messages.
git absorb - Git commit --fixup, but automatic.
ghq - Manage remote repository clones.
git-flow - Collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
gitin - Commit/branch/status explorer for git.
Git Town - Generic, high-level Git workflow support.
libgit2 - Portable, pure C implementation of the Git core methods provided as a re-entrant linkable library.
git-delete-squashed - Delete branches that have been squashed and merged into master.
rebase-editor - Simple terminal based sequence editor for git interactive rebase.
git-standup - Recall what you did on the last working day. Psst! or be nosy and find what someone else in your team did.
Git Happen! - common mistakes made with git
Last updated
Was this helpful?