git - Using Tags vs. Cleaning Commits -



git - Using Tags vs. Cleaning Commits -

i'm relatively new git, , have been reading around bit proper workflows, i'm struggling little bit suggestions rebase / squash commits single cohesive commits prior pushing other repos (e.g. github in case).

my main problem i'm hobbyist programmer (1-2hrs day if i'm lucky), means can take me days or weeks point of cohesive feature commit. furthermore, github back-up. workflow typically consists of 1-5 little commits (many of of "fixed stupid typo" variety) per evening, pushed 1 time per eve github repo. seems goals of publishing relatively clean commits , using github back-up not compatible.

instead of rebaseing commits, add together tags whenever finish features or bug fixes. seems me reasonable alternative it:

doesn't re-write history (which seems bad thing generally) allows @ important commits filtering on tags , diffing b/w tags is compatible using git repo (e.g. github) back-up in between "complete" commits

i've looked around bit, never seems offered alternative "cleaned up" commit workflow. missing something?

i agree statement re-writing git history bad thing do, if there other people contributing same branch you.

in order maintain git history on master branch commits represent completed features, or sets of related bug fixes, recommend creating branches limited scope of wish accomplish. instance, first 3 commits master might like

stub out client side models , views update javascript libraries latest versions bug-fixes: prepare event delegation , rendering discrepancies on settings page

the first commit in above list might series of commits branch might have created named sitesetup rebased before cherry-picked on master.

this sample branch sitesetup might have next commits

stub out client side models , views oops >> fix typo fix yet typo... sigh

by using branches, can sense free "make mess" out of commits, long rebase commits clean before committing changes on master.

git rebase

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -