Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git basics
  6. Recording changes
  7. Making and staging changes
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Making and staging changes

In the Git workflow, the working tree serves as your creative space where you can freely make changes to your code. You can edit existing files, add new ones, and remove any files that are no longer needed. Changes made in the working tree are not immediately saved in the Git repository. Instead, they are noted as modified in the index, which acts as an intermediary layer between the working tree and the repository.

When you're ready to save your changes and record them in the repository, you then stage those changes in the index. Staging involves selectively choosing the specific modifications or files you want to include in the next commit.

Once you have staged your changes in the index, you can proceed to make a commit.

Note: Only the changes that have been staged in the index will be included in the commit and saved in the repository. Any unmodified or unstaged changes in the working tree will not be part of the commit.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life