Tag: branching


Git Workflows, Part 3: Refactoring Large Branches and Pull Requests

Posted in Git

permalink

Summary

  • If a feature branch or pull request gets too complicated and should be refactored into simpler pieces:
    • Create a new feature branch from the original destination branch
    • Turn commits into patches, or cherry-pick commits (leaving changes unstaged)
    • Apply patches or cherry-picks to the feature branch
    • Use git add --patch or git add …


Tags:    git    rebase    cherry-pick    branching    version control   


Git Workflows, Part 2: Crafting Commits

Posted in Git

permalink

Summary

  • Make your commits small and atomic, and recombine them into larger commits later; it's easier to combine smaller commits than to split large commits.

  • Make use of git add -p and git add -e to stage changes selectively and atomically.

  • Make …



Tags:    git    rebase    cherry-pick    branching    version control   


Git Workflows, Part 1: Supercharging your Git Config

Posted in Git

permalink

Tags:    git    rebase    cherry-pick    branching    version control   


The Git-Commit-Ectomy

Posted in Git

permalink

TLDR: Visit the git-commit-ectomy guide: http://pages.charlesreid1.com/git-commit-ectomy


Consider the following completely hypothetical scenario.

Suppose you've been working for a while on your latest invention, a brand-new whiz-bang command line tool that's fast and solves an important problem and you're chugging your way to the finish line.

As part of preparing to release your software tool, you add some tests, because that's what you do.

Those tests require some data, so you add a few test data sets, a few hundred kilobytes each, nothing fancy.

Then one day, the intern (who is just trying to be helpful by …



Tags:    git    rebase    cherry-pick    branching    version control