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?

thanks,

chuck

1 answer

1 accepted

This widget could not be displayed.

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
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

891 views 2 3
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