Skip to content

Partial commits in GitHub for Windows

Ever found yourself in a situation where your working directory contains a mix of changes that don't quite fit together? It would be easy to commit it all at once…

Author

Ever found yourself in a situation where your working directory contains a mix of changes that don’t quite fit together? It would be easy to commit it all at once and move on; however, small, focused commits are great for making it easy to review and discuss a branch of work – especially when working on a complex codebase.

But how can you choose which changes to use in a commit?

The newest release of GitHub for Windows supports selecting lines or blocks of changes when creating a commit. Simply click the desired lines in the gutter, create the commit, and leave the other changes for you to continue working on.

Create a partial commit

For people familiar with the command line, this change is similar to interactive staging using git add -i or git add -p.

Explore more from GitHub

Product

Product

Updates on GitHub products and features, hot off the press.
GitHub Universe 2024

GitHub Universe 2024

Get tickets to the 10th anniversary of our global developer event on AI, DevEx, and security.
GitHub Copilot

GitHub Copilot

Don't fly solo. Try 30 days for free.
Work at GitHub!

Work at GitHub!

Check out our current job openings.