Is there a more efficient way to review and stage files which requires less scrolling?

Before staging a file in the index I like to review all of my changes. I highlight the file and then the diffs showup in the Hunk Browser panel. At the top there are buttons to Stage File or Discard. If the file only has minor changes I'm able to review the diff and select stage file.

However, when there are many screens of diffs (maybe I autoformatted code or refactored a really large method in to several smaller methods) I need to scroll. When I get to the bottom and am satisfied I need to scroll all the way to the top to chose Stage File.

It would be nice if the part of the screen that listed the filename, diff stats and Stage/Discard buttons floated so it was always visible or if it was repeated at the bottom.

Or have other people found a different workflow which I'm just missing that would keep me from scrolling so much?



1 answer

1 accepted

I understand this point of view, the problem I had with floating is that it got in the way of the diff, and listing it at the end too was confusing when you had multiple files selected. And listing it at the end only just made it harder for people who were at the top of the diff ;)

As a shortcut though, if you're staging the entire file you can hit Cmd-Shift-= to stage the current selection, at any time. Or drag/drop the file from the bottom pane to the upper pane. Or right-click it and Add.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you