GitSavvy's status dashboard view provides:
- an overview of the repo's current state;
- a list of each file that has been added, modified, or deleted, and whether the change has been staged;
- a list of stashes, if available; and
- keyboard shortcuts to perform actions on files, stashes, or the repo
Most of the actions available in the status view can also be performed through the command-palette
To access the status dashboard, open the command-palette and enter git: status
. The view will automatically refresh after changes occur and you return to the status view. If for any reason the view has not updated, you can press r
to refresh the view.
All keyboard shortcuts are displayed at the bottom of the status screen, with short descriptions of the corresponding action.
The following actions are performed against filenames under the cursor. Unless otherwise noted, each of these commands can be performed against multiple files (via multiple cursors or highlighting a region).
The file(s) will be opened in the current window.
The file(s) will be added to the Git index.
The file(s) will be removed from the Git index.
Any changes made to the selected file(s), when compared to HEAD, will be discarded.
WARNING: This action is not reversable.
The selected file(s) will be opened at the correct hash in a browser. At the moment, only GitHub.com and GitHub Enterprise are supported.
If the selected file has a merge conflict, that file will be opened by the external merge tool defined in the Git config.
Note: This action can only be performed on a single file at a time.
A GitSavvy window will be opened to allow you to examine the changes made to a file. Any additions will be displayed in green and any deletions in red. You will be able to browse between the hunks of changes made, stage/unstage those hunks, or stage/unstage individual lines.
If the file is staged, the inline diff view will be opened in cached mode. More information can be found here.
The following actions are performed against all applicable files in the repo.
All unstaged files will be added to the index. Untracked and ignored files will not be included.
All unstaged and untracked files will be added to the index. Ignored files will not be included.
All staged files will be removed from the index.
Any changes that have not been added to the indexed will be reverted to the state of HEAD.
WARNING: This action is not reversable.
A GitSavvy window will be opened to display the diff between the HEAD or index and the working directory. Once there, you will be able to stage individual hunks. More information can be found here.
A GitSavvy window will be opened to display the diff between the working directory and the HEAD or index. Once there, you will be able to unstage individual hunks. More information can be found here.
A GitSavvy window will be opened, where you will be prompted to enter a commit message. More information can be found here.
First, any unstaged changes will be automatically staged. Next, a GitSavvy window will be opened, where you will be prompted to enter a commit message. More information can be found here.
A GitSavvy window will be opened, where you will be prompted to amend the previous commit message. More information can be found here.
An entry for the file under the cursor will be added to the repo's root .gitignore
file.
You will be prompted to enter a pattern to be added to the repo's root .gitignore
file. The field will be pre-filled with the path of the currently selected file.
Stashes allow the user to temporarily save and later restore changes that are not ready to be committed. If any stashes are currently saved, they will be displayed in the status view.
The following actions are applied against the currently selected stash, where applicable. They use two-letter combinations to activate: just press the indicated keys in the order given.
Given a selected stash, apply the diff to the working tree.
Given a selected stash, apply the diff to the working tree and then delete the stash.
The diff for the selected stash will be displayed in another window.
You will be prompted to enter a description for the stash. Once provided, a new stash will be created from all un-committed changes (not including untracked files). After the changes are captured as a stash, they will be removed from the index and working tree.
Same as the above, except untracked files are included.
Given a selected stash, delete it without applying it.
When opening the status dashboard, GitSavvy attempts to detect the Git repository for which information should be displayed. This repo is derived from:
- the path of the currently open file;
- the path of the originating file while in a GitSavvy special view; or
- the first folder added to a project/window.
If none of these lead to a Git repository, an error will be displayed.