3days since the last Git and AI fuck-up

How to add changes in one file to two different commits in Git?

Sahil Bhatacharyafrom the archive

Let's say you were working on an update but needed to push some partial code in a fix or another update. To do it, you can quickly call the interactive add feature of git to select the portions of code you want to add using the following:

shell
git add -p

This is also helpful if you want to know what you are adding.

Originally Posted On: Github (k88hudson)

Tagged solving-mistories, git-commit, git-add