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…
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.
For people familiar with the command line, this change is similar to interactive staging using git add -i
or git add -p
.
Written by
Related posts
Celebrating the GitHub Awards 2024 recipients 🎉
The GitHub Awards celebrates the outstanding contributions and achievements in the developer community by honoring individuals, projects, and organizations for creating an outsized positive impact on the community.
New from Universe 2024: Get the latest previews and releases
Find out how we’re evolving GitHub and GitHub Copilot—and get access to the latest previews and GA releases.
Bringing developer choice to Copilot with Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview
At GitHub Universe, we announced Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini are coming to GitHub Copilot—bringing a new level of choice to every developer.