gitui-org / gitui-org/gitui

Support `fixup` workflow

Aperta
#2,019 8 commenti 9 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature-request
Lingua principale
Rust
Stelle
22.5k
Fork
774
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Is your feature request related to a problem? Please describe.**
I'd love a shortcut for `git commit --fixup ` from within gitui. [Here](https://dev.to/koffeinfrei/the-git-fixup-workflow-386d) is an article describing a common use case for it, but I'll give a short summary.

What this does is create a new commit with `fixup! commit message>`. You can then run `git rebase -i --autosquash` to squash the fixup commits into the target commits. This allows you to defer fixes/ammends to previous commits without messing with git history.

A nice use case is when a PR is under review. It let's you mark changes to existing commits without the reviewers losing track of what's been reviewed (as you would if you did `git commit --amend` or a rebase). Once the PR is approved you neaten the commit history using `git rebase -i --autosquash`.

**Describe the solution you'd like**
I'd like a new shortcut on the commit panel to trigger a `git commit --fixup `. e.g. `ctrl-f`. This would bring up a view similar to the `logs` panel which would allow choosing the commit to fixup.

To be clear - this would only perform `git commit --fixup ` and not `git rebase -i --autosquash`. No rebase should be involved.

**Describe alternatives you've considered**
Current workflow is:
1. Stage changes
2. Find the commit in logs view, copy the commit hash
3. Exit gitui
4. Manually `git commit --fixup `
5. Re-enter gitui, continue

**Additional context**
This was previously requested in #829 which was closed as completed - I think incorrectly as I [commented](https://github.com/extrawurst/gitui/issues/829#issuecomment-1895881991).

I've created a new issue instead of attempting to resurrect that one.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia nel pannello dei commit e confronta il suo comportamento con quello della vista dei log, quindi segui come gitui invoca git commit. La funzionalità è completa quando una scorciatoia consente agli utenti di scegliere un commit di destinazione ed eseguire git commit --fixup senza avviare un rebase.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, rust
Ambito
cli, devtools
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.