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

FR: Commit selector interface (for main view) #1361

Open
vt-alt opened this issue Jan 13, 2025 · 2 comments
Open

FR: Commit selector interface (for main view) #1361

vt-alt opened this issue Jan 13, 2025 · 2 comments

Comments

@vt-alt
Copy link

vt-alt commented Jan 13, 2025

tig is useful to select commits for git cherry-picking. I'd suggest adding the interface so it could be more visible and easier.

tig --select=file1 would enable selection column and record selected commits in the file1. Then pressing something like + would record the commit commit in the file (in git history order) and show selection marker in selection column.

Because it's in history order git cherry-pick $(tac file1) would work. If something is missed, re-run tig --select=file1 may work to continue the selection process. Or we could update commit list file1 with dependent commits (with some external tool) and see in tig what is selected.

@koutcher
Copy link
Collaborator

Add bind generic + @sh -c "git notes --ref=select add -m 'Pick Me! Pick Me!' %(commit) || git notes --ref=select remove %(commit)" to your .tigrc, start Tig with tig --notes=select, select your commits with +, use git notes --ref=select list | cut -d ' ' -f 2 to retrieve the commit list.

@vt-alt
Copy link
Author

vt-alt commented Jan 14, 2025

Thanks for the hint!

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

No branches or pull requests

2 participants