Tag: version control


Automatically Generating Up-To-Date requirements.txt for Python Projects

Posted in Python

permalink

Summary

In this post, we cover a pattern for automatically generating a requirements.txt file that has the latest compatible versions of required software, and that specifies the full and exact version of each package to make the Python environment reproducible.

This will turn a requirements input file (called requirements.txt.in for example) that looks like

numpy

into a requirements file that specifies the exact version of numpy and all dependencies, like

numpy==1.18 …


Tags:    python    pip    version control    make    makefile   


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