Skip to main content

commit changes and update repository

Overview

Assists in committing changes and updating the repository.

The steps for committing changes and updating the repository are described in the following order:

  • Stage modified files
  • Unstage files
  • discard file changes
  • Commit staged files
  • Push committed changes

Stage the changed files

To stage your modified files:

For staging all files

Staging modified files

Operation procedure
  1. Click the + button in the Changes folder in the Git navigator.
  2. Files listed under the Changes folder will be staged and a list of those files will be displayed in the Staged Changes folder.

When staging a specified file

Staging modified files

Operation procedure
  1. Mouse over the file you want to stage under the [Changes] folder in the Git navigator.
  2. Click the [+] button that appears.
  3. The specified file is staged and appears in the Staged Changes folder.

Unstage files

To unstage a file, do the following:

If you want to unstage all files

Unstage files

Operation procedure
  1. Click the "-" button in the Staged Changes folder in the Git navigator.
  2. The files listed under the Staged Changes folder will be unstaged and a list of those files will be displayed in the Changes folder.

To unstage the specified file

Unstage a file

Operation procedure
  1. Hover over the file you want to unstage under the Staged Changes folder in the Git Navigator.
  2. Click the [-] button that appears.
  3. The specified file is unstaged and appears in the Changes folder.

Discard file changes

To discard changes to a file and revert to the original file, follow these steps:

If you want to discard changes in all files

discard file changes

Operation procedure
  1. Click the [↓] button in the [Changes] folder in the Git navigator.
  2. The file changes displayed under the [Changes] folder are discarded and deleted from the [Changes] folder.

When discarding changes in the specified file

discard file changes

Operation procedure
  1. Mouse over the file whose changes you want to discard under the [Changes] folder in the Git navigator.
  2. Click the [↓] button that appears.
  3. Discards changes in the specified file and removes it from the Changes folder.

Commit staged files

To commit the staged files:

commit staged files

Operation procedure
  1. Set the commit message in the Commit message (Ctrl + Enter) text box in the Git navigator.
  2. Click the Commit button in the Git navigator.
  3. The files listed under the [Staged Changes] folder are committed, and the [Staged Changes] folder is deleted.
Revert last commit

If you commit a file by mistake, you can undo your previous commit by following these steps:

Revert last commit

Operating procedure

  1. Click the three dots at the top of the Git navigator.
  2. From the menu that opens, click the Commit > Revert Last Commit button.
  3. The previous commit is undone and the changed files are reverted to their pre-commit state.

Push the committed changes

To push files that have been committed to your local repository to a remote repository, follow these steps:

Push the committed files

Operation procedure
  1. Click the three dots at the top of the Git navigator.
  2. In the menu that opens, click the [Push] button.
  3. Push starts and completes after a certain amount of time.
About synchronizing with remote repositories
  • Click the [Sync (Pull and Push)] button at the top of the Git navigator to sync with the remote repository.
    Note that when you sync, you pull changes from the remote repository and merge them.