csWiki

the wiki of cscosine


Project maintained by cscosine Hosted on GitHub Pages — Theme by mattgraham

Table Of Contents

Partial commit workflow with stash (clean working tree)

This workflow lets you commit only selected changes while temporarily stashing everything else.

Step 1: Stage what you want to commit

git add -p
# interactive!

or do it in manually your IDE

Step 2: Stash everything else (including untracked files, but keep staged changes)

git stash push --keep-index --include-untracked

Step 3: Create your partial commit (only staged changes are included)

git commit -m "your partial commit message"

Step 4: Restore stashed changes

git stash pop