git - How to make a small change with a meaningful commit message that can be reverted? -


in using git, try make 1 small change @ time , commit each change separately. lets me have detailed commit messages, , lets me revert individual changes easily, described in blog post (not mine). when working on 1 large feature, see small unrelated bug fix. per current system, have note bug fix later (usually code comment), commit large feature, go , fix bug.

i wondering if branches let me make fix bug , push commit immediately, while finish feature in branch. can push fix both public repository and 'adding feature' branch? branches seem bit unwieldy this, there simpler method result i'm looking for?

it sounds should developing feature in feature branch (see, instance, this branching model).

so feature work in feature branch. when bug fix needed,

  1. switch feature branch master branch
  2. do bug fix in master
  3. push master
  4. switch feature branch
  5. continue work on feature

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -