GitKraken Desktop Documentation

Stage, Unstage, and Ignore Files in GitKraken Desktop

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 //WIP node 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 .gitignore files
  • 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:

  1. Select the //WIP node in the Commit Graph to open the Commit Panel.
  2. Hover over a file and click Stage File, or click Stage All Changes to stage everything at once.
  3. 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:

  1. Select the //WIP node in the Commit Graph to open the Commit Panel.
Working directory changes shown in GitKraken Desktop with the //WIP node selected in the commit graph
Select the //WIP node to view your working changes.
  1. Hover over a file and click to stage it.
GitKraken Desktop showing unstaged files with the 'Stage File' button visible next to markdown.md
Click Stage File on hover.

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
Context menu in GitKraken Desktop showing 'Stage selected lines' for staging specific changes from the diff view.
Right-click to stage specific lines or hunks.

Tip: Use keyboard shortcuts to speed up staging actions.


How to unstage files or lines

To unstage a file:

  1. Select the file under the Staged Files section
  2. Click
The staged files list in GitKraken Desktop showing the Unstage File button for a selected file.
Click Unstage File to move it back to working changes.

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

The file diff view in GitKraken Desktop showing the Unstage Hunk option with a pointer from the staged file list.
Unstage specific hunks directly from the diff view.

To unstage all files, click .


How to discard changes

To discard changes across your working directory:

  1. Select the //WIP node
  2. Click the trash icon (Discard all changes). If you selected files first, it discards only those files.
Discard all changes button highlighted above a list of unstaged files.
Discard changes for all or multiple selected 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
Discard hunk button highlighted above a section of modified code.
Discard selected hunks of code.

How to ignore files

To prevent Git from tracking certain files, add them to a .gitignore file.

Right-click a file and select Ignore:

Context menu with Ignore options for a selected file in the Tree view
Choose ignore rules based on file, extension, or folder.

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:

Dialog with options to ignore, ignore and stop tracking, or cancel for a selected tracked file
Prompt showing options to ignore a file already tracked by Git.

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

Untracked .gitignore and test.txt files displayed under the obj folder in the Unstaged Files section.
Ignore file but keep it tracked by Git.

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

.gitignore file shown as unstaged; test.txt under obj folder shown as staged for removal
Ignore file and remove it from Git tracking.

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.

Have feedback about this article? Did we miss something? Let us know!
On this page