Partial commits in GitHub for Mac
Sometimes when you’re in the zone, you get a ton of work done before you have a chance to pause and commit. You want to break the commit down to…
Sometimes when you’re in the zone, you get a ton of work done before you have a chance to pause and commit. You want to break the commit down to describe the logical changes you’ve made, and it doesn’t always break down cleanly file by file. You want to select some parts of your changes to commit at a time. That’s easy in GitHub for Mac.
Select one or more lines to commit by clicking on the line numbers in the gutter. In the latest release, you can select a block of changes at a time. Hover over the right hand side of the line numbers to get a preview of what will be selected, and click to select.
You can select multiple lines or blocks of changes by clicking and dragging. The left of the line numbers will select line by line, and the right will select block by block.
Now you can commit your selected changes, leaving the rest for a later commit.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2024/03/Enterprise-LightMode-1-1.png?resize=400%2C212)
GitHub Availability Report: January 2025
In January, we experienced two incidents that resulted in degraded performance across GitHub services.
![GitHub Copilot agent mode](https://github.blog/wp-content/uploads/2025/02/Agent-Sunrise-1.png?resize=400%2C212)
GitHub Copilot: The agent awakens
Introducing agent mode for GitHub Copilot in VS Code, announcing the general availability of Copilot Edits, and providing a first look at our SWE agent.
![](https://github.blog/wp-content/uploads/2025/01/innovation_graph_1.png?resize=400%2C212)
That’s a wrap: GitHub Innovation Graph in 2024
Discover the latest trends and insights on public software development activity on GitHub with the release of Q2 & Q3 2024 data for the Innovation Graph.