Movatterモバイル変換


[0]ホーム

URL:


Sublime Text

Git Integration
Version:

Added in:3.2

Sublime Text’s Git integration includes the following components:

Please note: the following documentation discusses the implementation of theGit integration as seen with the Default and Adaptive themes that are includedwith Sublime Text. Via the theme engine, it is possible for third-party themesto change the visual presentation of information, in which case the followingdocumentation may not be accurate.

Side Bar🔗

Files and folders displayed in the side bar will include a status badge alongthe right-hand edge, when modified. This includes files and folder intheFolders section of the side bar, along with files in theOpen Filessection. Ignored files and folders are de-emphasized in the side bar byreducing the opacity of the name.

When the mouse pauses over a status badge, a tool tip will be displayedindicating the status of the file, or in the case of a folder, the status ofthe contained files and folders.

Status Badge Key🔗

The following table indicates the meaning of each badge.Please note that thecolor of the badges will be slightly different as they adapt to the closest huein the active color scheme.

  • Untracked
  • Modified
  • Missing
  • Staged Addition
  • Staged Modification
  • Staged Deletion
  • Unmerged

When a folder contains files with multiple statuses, the badge most toward the end of the above list will override all others.

Status Bar🔗

When the focussed file us containing within the working directory of a Gitrepository, the status bar will contain the name of the current branch, alongwith the number of files that are untracked, modified, staged or unmerged. Thestatus bar element will look like:

master 3

Diff Markers🔗

Sublime Text’sincremental_diff functionality ties in withthe Git integration. By default, the incremental diff functionality trackschanges to the file since it was last saved, but it is also possible to diffagainst HEAD.

Here is an example of what the diff markers look like in action, using theMariana color scheme:

27
28A line that was added
29
30A modified line
31followed by another modified line
32
33The line before this was deleted
34

Changing the settinggit_diff_target to"head" will modify the diffmarkers to display a diff versus the version of the file at the Git repositoryHEAD, as opposed to the version of the file in the working directory.

See theincremental_diff documentation for more informationand examples, including instructions for viewing inline diffs, navigatingbetween hunks and reverting changes.

Sublime Merge Integration🔗

The Git features available in Sublime Text were derived from work that went intoour other product,Sublime Merge. SublimeMerge is a full-featured, blazing-fast Git client built upon the technologiesfrom Sublime Text.

Since editing source code and prose requires different tools and workflows thanmanaging a Git repository, we opted to integrate the most appropriate Gitfunctionality into Sublime Text, but leave more advanced features in SublimeMerge. The following integration points make it easy to jump into theappropriate Git context:

Editor Context Menu🔗

  • Open Git Repository…

  • File History…

  • Line History…

  • Blame File…

Side Bar Folder Context Menu🔗

  • Open Git Repository…

  • Folder History…

Side Bar File Context Menu🔗

  • Open Git Repository…

  • File History…

  • Folder History…

  • Blame File…

Command Palette🔗

  • Sublime Merge: Open Repository

  • Sublime Merge: Folder History

  • Sublime Merge: File History

  • Sublime Merge: Blame File

Settings🔗

"show_git_status"boolean🔗

Enables Git integration.

Default:true

"git_diff_target"string🔗

Controls the behavior of incremental diff for files in a Git repository. Valid values include:

  • "index" – diff against the Git index

  • "head" – diff against the file at HEAD

Default:"index"

Introducing our Git client
Sublime Merge

[8]ページ先頭

©2009-2026 Movatter.jp