Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creating branches from a specific commit #12160

Merged
merged 3 commits into from
May 7, 2021

Conversation

sergiou87
Copy link
Member

@sergiou87 sergiou87 commented May 6, 2021

Description

Fixes #3474

This PR just adds a new action to the commit context menu to allow creating branches from a specific commit.

Screenshots

Screen.Recording.2021-05-06.at.16.30.31.mov

Release notes

Notes: [Added] Create branches from any commit in your repository

@sergiou87 sergiou87 marked this pull request as ready for review May 7, 2021 07:39
@sergiou87 sergiou87 requested a review from tidy-dev May 7, 2021 07:39
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Code looks great! Tested it out and works like a charm. I am excited to use this feature!

A suggestion: (and if you think it is worth it - could be a separate PR)
We have easy access to the commit summary at this point. It may be more user friendly to show the summary and the sha?

We do this on the progress dialogs for rebase/cherry-picking so I also think it would be more consistent. (Below is just a quick mock up, there may be a better way to put it to be friendly to long summaries and maybe styling should use a bold/emphasized instead of in quotes)
image

Side note: "from your repository" may be redundant?

@@ -199,6 +200,17 @@ export class CommitListItem extends React.PureComponent<
},
]

items.push({
label: __DARWIN__
? 'Create Branch From This Commit'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? 'Create Branch From This Commit'
? 'Create Branch from This Commit'

Where mac uses title case and from is a preposition, it should be lowercase.

Copy link
Contributor

@tidy-dev tidy-dev May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing it out,
I noticed the revert and cherry-pick menu item does not have the word 'This' in it. Just a suggestion, but for consistency we could leave This out.

image

Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... context switched while reviewing this.. and forgot about the title case comment, I think that should be updated before merging. :)

sergiou87 and others added 2 commits May 7, 2021 13:12
Co-Authored-By: tidy-dev <75402236+tidy-dev@users.noreply.github.com>
@sergiou87
Copy link
Member Author

I implemented both of your suggestions, I think they make a lot of sense, so thank you!! ❤️

image

@sergiou87 sergiou87 requested a review from tidy-dev May 7, 2021 11:21
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Thanks for the changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a new branch from a previous commit
2 participants