*merginal.txt* Author: Idan Arye License: Same terms as Vim itself (see |license|) Version: 1.4.0 INTRODUCTION *merginal* Merginal aims provide a nice inteface for dealing with Git branches. It offers interactive TUI for: * Viewing the list of branches * Checking out branches from that list * Creating new branches * Deleting branches * Merging branches * Rebasing branches * Solving merge conflicts * Renaming branches REQUIREMENTS *merginal-requirements* Merginal is based on Fugitive, so it requires Fugitive. If you don't have it already you can get it from https://github.com/tpope/vim-fugitive It should go without saying that you need Git. Under Windows, vimproc is an optional requirement. Merginal will work without it, but it'll pop an ugly console window every time it needs to run a Git command. You can get vimproc from https://github.com/Shougo/vimproc.vim USAGE *merginal-usage* To use Merginal you need to know but one command: *:Merginal*. It'll open the |merginal-branch-list| buffer, unless the repository is in merge mode then it'll open the |merginal-merge-conflicts| buffer. Like Fugitive's commands, |:Merginal| is native to the buffer, and will only work in buffers that are parts of Git repositories. You can also toggle the buffer with |:MerginalToggle| or close it with |:MerginalClose|. THE BRANCH LIST *merginal-branch-list* The branch list shows a list of branches. While in that list, you can use the following keymaps to interact with the branches: R Refresh the buffer list. cc Checkout the branch under the cursor. ct Track the remote branch under the cursor. cT Track the remote branch under the cursor, prompting for a name. C Same as cc. aa Create a new branch from the currently checked out branch. You'll be prompted to enter a name for the new branch. A Same as aa. dd Delete the branch under the cursor. D Same as dd. mm Merge the branch under the cursor into the currently checked out branch. If there are merge conflicts, the |merginal-merge-conflicts| buffer will open in place of the branch list buffer. M Same as mm. mf Merge the branch under the cursor into the currently checked out branch using Fugitive's |:Gmerge| command. rb Rebase the currently checked out branch against the branch under the cursor. If there are rebase conflicts, the |merginal-rebase-conflicts| buffer will open in place of the branch list buffer. ps Prompt to choose a remote to push the branch under the cursor. pS Prompt to choose a remote to force push the branch under the cursor. pl Prompt to choose a remote to pull the branch under the cursor. pf Prompt to choose a remote to fetch the branch under the cursor. gd Open |merginal-diff-files| buffer to diff against the branch under the cursor. rn Prompt to rename the branch under the cursor. MERGE CONFLICTS *merginal-merge-conflicts* The merge conflicts buffer is used to solve merge conflicts. It shows all the files that have merge conflicts and offers the following keymaps: R Refresh the merge conflicts list. Open the conflicted file under the cursor. aa Add the conflicted file under the cursor to the staging area. If that was the last conflicted file, the merge conflicts buffer will close and |fugitive-:Gstatus| will open. A Same as aa. REBASE CONFLICTS *merginal-rebase-conflicts* The rebase conflicts buffer is used to solve rebase conflicts. It shows the currently applied commit message and all the files that have rebase conflicts, and offers the following keymaps: R Refresh the rebase conflicts list. Open the conflicted file under the cursor. aa Add the conflicted file under the cursor to the staging area. If that was the last conflicted file, prompt the user to continue to the next patch. A Same as aa. ra Abort the rebase rc Continue to the next patch. rs Skip the current patch REBASE AMEND *merginal-rebase-amend* The rebase amend buffer is shown when you amend a patch during a rebase. It shows the amended commit's shortened hash and commit message. Additionally, it shows all the branches so you can diff against them while the patch. If offers the folloing keymaps: R Refresh the rebase amend buffer. gd Open |merginal-diff-files| buffer to diff against the branch under the cursor. ra Abort the rebase rc Continue to the next patch. rs Skip the current patch DIFF FILES *merginal-diff-files* The diff files buffer is used to diff against another branch. It displays all the differences between the currently checked out branch and the branch it was opened against, and offerts the following keymaps: R Refresh the diff files list. Open the file under the cursor(if it exists in the currently checked out branch). ds Split-diff against the file under the cursor(if it exists in the other branch) ds VSplit-diff against the file under the cursor(if it exists in the other branch) co Check out the file under the cursor(if it exists in the other branch) into the current branch.