Remote Operations
Push and pull changes with support for multiple remotes and advanced options.
Keybindings
| Key | Action | Notes |
|---|---|---|
p | Push | * Global (not when a popup is showing) |
P | Pull | * Global (not when a popup is showing) |
< / > | Switch Component Panel | |
n | New Remote | |
d | Remove Remote | |
e | Edit Remote | |
enter | Set as Tracking Upstream | |
? | Keybindings and Instructions |
info
The Local Branches, Tag, and Remote panels share the same space. Use < / > to switch between them.
Workflows
Adding a Remote
- Navigate: Go to the Remote component (press
1) or switch to it (press< / >). - Trigger: Press
n. - Input Name: Enter the remote name (e.g., 'origin').
- Next: Press
tabto move to the URL field. - Input URL: Enter the remote URL (e.g.,
https://example.com/repo.gitor[email protected]:repo.git). - Confirm: Press
enter. - Close: Press
escto close the output.
Editing a Remote
- Navigate: Go to the Remote component (press
1) or switch to it (press< / >). - Select: Select the remote to edit using
↑/↓. - Trigger: Press
e. - Edit: Enter the new remote name, url, or both.
- Confirm: Press
enter. - Close: Press
escto close the output.
Removing a Remote
- Navigate: Go to the Remote component (press
1) or switch to it (press< / >). - Select: Select the remote to remove using
↑/↓. - Trigger: Press
d. - Confirm: Press
enter. - Close: Press
escto close the output.
Setting as Tracking Upstream
- Navigate: Go to the Remote component (press
1) or switch to it (press< / >). - Select: Select the remote you want to set as tracking upstream using
↑/↓. - Trigger: Press
enter.
Pushing Changes
- Trigger: Press
p. - Logic Flow:
- Check Remotes: Gitti checks your configured remotes.
- Scenario A (No Remote):
- Popup: "Add Remote". You must add a remote before pushing.
- Scenario B (Multiple Remotes):
- Popup: "Choose Remote". Select which remote to push to (e.g.,
origin,upstream). - Next: Proceed to Push Options.
- Popup: "Choose Remote". Select which remote to push to (e.g.,
- Scenario C (Single Remote):
- Next: Proceed directly to Push Options.
- Push Options: A popup appears to select the push mode:
git pushgit push --forcegit push --force-with-lease
- Confirm: Select an option and press
enter.
Pulling Changes
- Trigger: Press
P(shift+p). - Logic Flow:
- Check Remotes: Similar to push, checks for existing remotes.
- Pull Options: A popup appears to select the pull mode:
git pull(Based on user configuration)git pull --rebasegit pull --no-rebase
- Confirm: Select an option and press
enter.
note
The rebase and merge options will pull from the current branch's own upstream. Support for rebasing or merging with other remotes or branches will be available in an upcoming version.