Last updated: November 2026
Use this page to stage, unstage, discard, and ignore files in GitKraken Desktop from the Commit Panel and diff view.
Requirements and limits
- Workflow scope: Working directory and staged file management from the Commit Panel and diff view
- Starting point: Select the
//WIPnode to work with current uncommitted changes - Line-level actions: Stage, unstage, and discard selected lines or hunks from the diff view
- Ignore behavior: GitKraken Desktop writes ignore rules to the root-level
.gitignore - Ignore limitation: GitKraken Desktop does not read nested
.gitignorefiles - Tracked-file behavior: Ignore and Stop Tracking removes the file from the Git index in addition to adding the ignore rule
| Action | Scope | Where to do it | Notes |
|---|---|---|---|
| Stage file | Whole file | Commit Panel | Moves the file into Staged Files |
| Unstage file | Whole file | Commit Panel | Returns the file to the working directory |
| Stage selected lines | Partial file | Diff view | Supports line or hunk-level staging |
| Discard changes | Whole file or selected hunk | Commit Panel or diff view | Permanently removes uncommitted changes |
| Ignore | File, extension, or directory | Context menu on unstaged files | Writes to the root-level .gitignore |
| Ignore and Stop Tracking | Already tracked file | Context menu on tracked files | Adds ignore rule and removes the file from the Git index |
Quick Start
To stage files:
- Select the //WIP node in the Commit Graph to open the Commit Panel.
- Hover over a file and click Stage File, or click Stage All Changes to stage everything at once.
- To stage specific lines, click a file to open its diff, highlight the lines, right-click, and select Stage selected lines.
To unstage files: Select a file under Staged Files and click Unstage File. Click Unstage All Changes to move all staged files back to the working directory.
To discard changes: Select the //WIP node and click the trash icon to discard all changes or the selected files. To discard individual hunks, click a file to open its diff and click Discard Hunk.
To ignore a file: Right-click any unstaged file and select Ignore. Choose to ignore by file name, extension, or directory. GitKraken Desktop adds the rule to the root-level .gitignore. For already-tracked files, select Ignore and Stop Tracking to also remove the file from the Git index.
How to stage files and changes
Staging prepares your file changes for commit. To begin:
- Select the //WIP node in the Commit Graph to open the Commit Panel.

- Hover over a file and click to stage it.

You can also:
- Click to stage all files at once
- Click a file to view its diff and selectively stage lines:
- Highlight lines
- Right-click and select Stage selected lines

Tip: Use keyboard shortcuts to speed up staging actions.
How to unstage files or lines
To unstage a file:
- Select the file under the Staged Files section
- Click

To unstage lines or hunks, click a staged file to view its diff, then right-click the lines or click Unstage Hunk.

To unstage all files, click .
How to discard changes
To discard changes across your working directory:
- Select the //WIP node
- Click the trash icon (Discard all changes). If you selected files first, it discards only those files.

You can also:
- Select 1 or more files, right-click, and select Discard changes
- Discard lines or hunks from the file diff, for example with Discard Hunk

How to ignore files
To prevent Git from tracking certain files, add them to a .gitignore file.
Right-click a file and select Ignore:

You can choose to:
- Ignore the selected file only
- Ignore all files with that extension
- Ignore all files in the directory
GitKraken Desktop adds the rule to the .gitignore file at the root of your repository.
Note: GitKraken Desktop uses only the root-level .gitignore file. It does not read nested .gitignore files.
How to ignore previously tracked files
If the file is already tracked, a prompt offers 2 ways to ignore it:

Ignore adds the entry to the .gitignore file, and Git continues to track the file.

Ignore and Stop Tracking adds the entry and removes the file from the Git index, so Git stops tracking it.

For a file with a merge conflict, the prompt offers only Ignore. The same applies when you ignore an extension or a folder that includes a conflicted file. To also stop tracking the file, resolve the conflict first.