View: Git Status & Staging
Symbol:
Corresponding Git command: git status
Function: The view shows the Git status of the objects and files which have changed or are new since the last commit. Changes can be staged for a commit here and committed. A comparison of the changes is possible directly and changes since the last commit can be removed from the working directory. When conflicts or relationship issues occur from a merge attempt, this is shown in the view here.
Call: menu
Requirement: The open project is managed in Git.
Title bar: | |
Branch: <branch name> Last commit: <ID> | Name of the affected branch The current status of the branch is prepended. Examples: Merging, Clicking the name of the branch opens the Git Branches view. Clicking the ID of the last commit opens the Git History view. |
![]() | The view is refreshed. |
| Regardless of a selection in the table, all changes are discarded, even any unstaged changes. The project is reset to the status which it had before all changes were not yet committed. |
| Opens the Commit staged and unstaged changes dialog (see below) |
Compare the changes:
Double-click an object entry to open a separate Comparison view ("Diff"), which shows the differences between the current status of the object (new...) and the last committed status (base...). For details, see "Comparison view" below.
Find affected objects in the project navigator:
For more information, see the Show this object and Show all affected objects commands in the context menu of an object entry.
Staged Changes
The top part of the Git Status view shows the changed objects which are staged for a commit (Git index). This is where the staging for commits are organized and the commits performed.
Object Physical path | Path of the changed object in the Git project Example: When the Show physical paths option in the context menu of the Object column is selected, the Physical path column with the full path of the object is also displayed. Example: Context menu of an object entry:
|
Index status, Details | Git status of the object in the index (internal) Possible statuses:
Attention: A reset operation in the index may overwrite the contents of the object in the working directory. |
| Regardless of a selection in the table, all changes are discarded, even any unstaged changes. The project is reset to the status which it had before all changes were not yet committed. |
| Opens the Commit staged and unstaged changes dialog |
| Opens the Commit staged changes dialog On commit, all changes in the index (staged changes) are applied to the new commit. The changes in the working directory (unstaged) are not applied. |
| The staged changes for the commit are reset to "unstaged". The entries in the window are removed. Attention: A reset operation in the index may overwrite the contents of the object in the working directory. |
Unstaged Changes
The bottom part of the Git Status view shows all changes which have been made in the project since the last commit and those which are not yet staged for a commit. They can now be staged. These can be changes to objects which are already tracked in the Git repository, or still "untracked" objects. "Untracked" objects have not yet been registered in the Git repository by means of the Add (git add
) or Commit (git commit
) command.
Object Physical path | Path of the changed object in the Git project Example: For the possible display of Physical path, see above in "Staged Changes". |
Working tree status, Details | Status of the object in the working directory:
|
( | The selected changes are staged for the commit and moved to the Staged Changes area. |
| All changes which are listed in the Unstaged Changes view are discarded. |
| The selection of all changes is selected or unselected. |
Dialog: Commit staged changes
Symbol:
Function: In the dialog, you initiate a commit of the staged changes or an empty commit.
Call: Commit complete command in the Git Status view
<user name and email> | Name and email address of the committer These credentials for the repository can be saved in the .gitconfig of the local repository with Remember me. Then CODESYS Git will automatically use them for the next corresponding actions. |
Commit to <...> | Destination of the commit. Example: Commit to branch 'refs/heads/master' |
<name of the committer> | Name and E-Mail address of the committer In CODESYS Git, no distinction is made between the committer and the author. Therefore, the author is already specified here as the committer. |
Commit message | Commit message (required) |
Allow empty commit |
|
Dialog: Commit staged and unstaged changes
Symbol:
Function: In the dialog, you initiate the commit of all changes in the project, whereby the status "staged" is skipped. As in the Commit staged changes dialog, you need to specify a commit message and, provide or confirm the committer information. Optionally, an empty commit is also possible here.
Call: Commit complete command in the Git Status view
Comparison view
Symbol:
Function: The view shows the differences between the commits. Changes can be accepted or discarded.
Call: Double-click a change in the Git Status. view
Important
DO NOT make any changes in the comparison view. Only exception: Resolving any conflicts.
The functionality and handling of the comparison view correspond to the comparison view which is used for a project compare.
The new status of the object (new (staged|unstaged) which is created by the change is compared with the last status of the object in the index (base (head, <object ID>)
for the unstaged changes. For the staged changes, it is compared with the last status in the repository.
For more information about the CODESYS comparison view, see: Project Comparison