-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: General
-
None
-
Environment:Standalone, JDK 1.8.0, Win8.1
As a user of SourceTree, I want to see commits that were made while detached, so that I can easily recover lost commits after I switch back to a branch.
Conditions of Satisfaction:
When I am in the 'Log / History' tab, I have an option to 'Show Dangling Commits'.
When I enable to 'Show Dangling Commits' option, I can see commits that occurred without a branch or tag attached.
Notes:
Steps to lose a commit:
1. Checkout a change that isn't on a branch by double-clicking it.
2. Answer 'OK' to the 'Confirm change working copy' dialog
3. Make a commit
4. Checkout a branch by double-clicking on it's name.
Results:
The previous commit is gone from the UI without an easy way to find it.
Currently the only way to recover a lost commit is to use the terminal. Since I'm not familiar with the git command line, I needed to do some research. My current work-around is:
1. Option the command line.
2. Type 'git reflog'
3. Find the commit that no longer shows up in SourceTree
4. Cherry-pick or merge in the commit using it's shortened id in the reflog.
If the dangling commit showed up in the UI, It would be much easier to recover.
Honestly, I think this option should be on by default so newbs like me aren't as likely to lose their work.