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

[RFC] Smart interactive rebase #137

Open
chshersh opened this issue Jan 20, 2020 · 2 comments
Open

[RFC] Smart interactive rebase #137

chshersh opened this issue Jan 20, 2020 · 2 comments
Labels
question Further information is requested

Comments

@chshersh
Copy link
Contributor

Often enough we're using the following command:

git rebase -i HEAD~3

to modify a set of commits locally. I have few ideas regarding introducing a similar command to hit:

  1. Add a command like hit edit-history 3 (probably with better name) which is equivalent to the above command.
  2. Implement smart rebase which automatically figures out how many commits to look. This probably can be done somehow by comparing master and current branch and finding common last parent. Maybe the command can be less smarter and just show be a combination of git log + git rebase...

Any thoughts? Does it make sense to introduce a command like this or it's not worth the complecity and maintenance burden?

@chshersh chshersh added the question Further information is requested label Jan 20, 2020
@vrom911
Copy link
Member

vrom911 commented Jan 21, 2020

Oh, I like that!
Probably, just the hit edit name will be enough? Or you think that it can have some other semantic meaning?

@chshersh
Copy link
Contributor Author

I like hit edit because it's short 🙂 But it could be a bit ambiguous... On the one hand, we might to add more commands to hit like hit edit issue, hit edit commit, hit edit history. On the other hand, we don't have a goal to implement a nice wrapper around git with more readable commands, the goal is to support the workflow, so adding a lot more commands we need to test might not be a good idea. However, we do use git rebase -i a lot! I just don't find rebase -i readable enough for this purposes... Alternative naming proposals:

hit rewrite
hit history
hit retro
hit time-travel

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

No branches or pull requests

2 participants