Skip to content

Allow rebasing with comitter date as author date #4517

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

Open
Insprill opened this issue Apr 27, 2025 · 2 comments
Open

Allow rebasing with comitter date as author date #4517

Insprill opened this issue Apr 27, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Insprill
Copy link

Is your feature request related to a problem? Please describe.
Rebasing branches is a prevalent part of my workflow. To avoid mangling dates during this, I always rebase with the --committer-date-is-author-date flag to preserve the original date of the commit when viewed in GitHub, BitBucket, or any other application that shows the committer date instead of the author date. As far as I can tell, Lazygit has no way to set this flag globally for all rebase operations.

Describe the solution you'd like
A config option to set this flag automatically when doing any type of rebase.

Describe alternatives you've considered

  • Rebasing outside of Lazygit.
  • Do complex interactive rebases within Lazygit, then go back and rebase again manually with the flag to fix the dates (when it is reasonable to do so).

Additional context
The --committer-date-is-author-date flag implies --force-rebase, which may not always be desired. I suppose ideally it'd only be applied if the operation would actually change the committer date, but I'm not sure how Git handles dates when fast-forwarding to know if that's necessary, or if it's feasible to implement.

@Insprill Insprill added the enhancement New feature or request label Apr 27, 2025
@ChrisMcD1
Copy link
Contributor

I don't believe lazygit has a way to set this flag globally either. The only explicit interactions we do with committer date vs author date is allow sorting based on each of them.

Sounds like another case that would be helped by #2849

To make sure I'm hearing your request correctly, this is a setting that you image people would either want on all the time, or not at all? So it is better suited by a configuration option, and not by a 2nd keybinding that does a rebase with this flag.

@Insprill
Copy link
Author

Insprill commented May 3, 2025

Correct - I'd like it to always be enabled or disabled, but also having a keybind to do the opposite of the global setting when desired may be nice.

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

No branches or pull requests

2 participants