Skip to content

Instantly share code, notes, and snippets.

@ckunte
Created February 10, 2020 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckunte/06f43f388f1c822b7074de2dcfa493e8 to your computer and use it in GitHub Desktop.
Save ckunte/06f43f388f1c822b7074de2dcfa493e8 to your computer and use it in GitHub Desktop.
Git Work-flow

git work-flow

git work-flow is first and foremost about discipline. A disorganised approach leads a repository becoming unusable over time.

For production

Chisel has multiple branches. Since it's forked, my master branch is always at-par with the original developer's code base. Occasionally, I branch-out of master, work-on a feature, and when it's ready, I send a pull request to the developer for merging it into the master branch — this though is exceedingly rare.

To update my site, I use the ck branch, which includes site-specific configuration, custom features, and modifications. I run Chisel as follows:

git -C "$HOME/Projects/chisel" checkout ck
time python3 $HOME/Projects/chisel/chisel.py

The first line above ensures that I am switched to the branch I need before running.

For development

git help everyday offers an overview of twenty odd commands to be productive in various roles as (a) an individual developer, (b) a participant developer, (c) an integrator, and as (d) a system administrator. It has taught me more than any book could, and it's one command away from access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment