jesseduffield.lazygit/pkg
Trương Duy Khánh 2e5667dd80
Push/pull the selected branch from the Branches panel (#2)
* Add a keybinding to push the selected branch in the Branches panel

Push (shift+P) always targeted the checked-out branch, even with a
different branch highlighted in the Branches panel. That made pushing
any other local branch require checking it out first.

git push with no refspec always targets whatever is checked out, so
reaching a non-current branch requires naming it explicitly in the
refspec. Add that explicit-refspec path and wire a new keybinding in
the Branches panel that pushes whichever branch is selected, leaving
the existing global push (used from any other panel) untouched.

* Add a keybinding to pull the selected branch's linked worktree

Real git has no way to merge or rebase into a branch that isn't
checked out anywhere - that always needs a working tree. Fast-forward
(already available via the F key) covers the clean case, but a
diverged branch needs a real pull, which is only possible if the
branch has its own linked worktree.

Add p in the Branches panel for that case: it runs the pull in the
branch's linked worktree rather than the currently open one, and is
disabled when the branch has no worktree. If the pull hits a conflict
in a worktree other than the one currently open, we can't drop the
user into the interactive conflict-resolution flow (that UI operates
on the open worktree), so we report the failure and point them at
switching to it instead.

* Remove the No PRs rule from AGENTS.md

That rule guarded against an agent opening PRs against the upstream
jesseduffield/lazygit repo. This is a personal fork with its own
workflow, so the guard no longer applies here.

---------

Co-authored-by: Khanh Truong <khanh_t@arbin.com>
2026-08-10 10:45:29 +07:00
..
app Recognize a repo that has no work tree instead of bailing out 2026-08-08 11:15:01 +02:00
cheatsheet Render every key for a binding in the cheatsheet 2026-05-25 15:18:18 +02:00
commands Honor the conflict-marker-size gitattribute 2026-08-08 12:43:42 +02:00
common Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
config Merge remote-tracking branch 'origin/master' 2026-08-10 10:44:31 +07:00
constants Adapt links 2026-07-31 08:42:51 +02:00
env Remember how to get back to a repo we entered a submodule from 2026-08-08 11:15:01 +02:00
fakes Modernize all codes 2025-11-15 10:46:23 +01:00
gocui Exclude more commit trailers from auto-wrapping 2026-08-02 19:22:34 +02:00
gui Push/pull the selected branch from the Branches panel (#2) 2026-08-10 10:45:29 +07:00
i18n Push/pull the selected branch from the Branches panel (#2) 2026-08-10 10:45:29 +07:00
integration Merge remote-tracking branch 'origin/master' 2026-08-10 10:44:31 +07:00
jsonschema Fold legacy quit-alt1 into the multi-key quit binding 2026-05-25 15:32:47 +02:00
logs Fix Windows linter errors 2026-06-16 16:21:13 +02:00
snake Enable intrange linter, and fix warnings 2025-06-30 18:30:11 +02:00
tasks Give task commands a Terminate method instead of exposing their process 2026-08-04 07:03:27 +02:00
theme Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
updates Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
utils Make StringStack generic 2026-08-08 11:15:01 +02:00