Scenario: While working on a task/feature, you fixed a small bug in an unrelated area of one of the files you changed. At commit, you'd like to commit that separately.
Tried staging the hunk I wanted to commit,
- There is no option to commit what is staged,
Tried staging what I didn't want to commit,
- Everything I'd staged also appeared in the commit anyway,
Tried discarding what I didn't want to commit,
- Actually removed/reverted the change from the source file.
So what is the intended workflow for cherry picking a subset of changes and commiting just them? Am I missing something obvious?
Hi, Kieran, Sorry for the delayed reply - it was for Windows but the pathalogical behavior went away and the workflow is now actually pretty nice -- one simply selects "Commit" from the button bar or on the "Uncomitted changes" view and then "stage hunk" or "stage selected lines", which automatically takes you into "Staged changes" view mode, and in that mode you can cherry pick hunks or individual lines to commit.
The only disadvantage to this right now is that when you "stage file" the view refreshes and resets the selected file to the top file in the list.
Lets say you just removed a #include from include/pch.h and you want to commit adding the include to the src/*.cpp files. This gets annoying, fast, because every time you "stage file" from a src file, it resets the current file to h/pch.h.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oliver,
Thanks very much for the insight. This sounds to me like you'd like it to behave in a different manner. If so, could you possible file a new issue on jira.atlassian.com (project SRCTREEWIN) with as much detail as possible? Feature requests go there usually and they're reviewed periodically with feedback given and hopefully assigned to an issue.
Thanks very much
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oliver. Is this for Windows or Mac?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.