Git: What’s the working tree?
1 September 2022 (Updated 14 January 2023)
In a nutshell
The working tree
is your current working directory / workspace โ containing the files currently checked out in your branch.
When you make changes to your working tree, you use git add
to add the changes to your index.
Where does the working tree fit in the Git workflow?
- You check out a branch. This checked out branch is your working tree. (
git checkout
) - You make a change. The changed files are in your working tree.
- You stage the change to the index (
git add
). - You commit changes in your staging area to your local repo (
git commit
). - You push the changes from your local repo to the remote repo (
git push
)
Sources
Tagged:
Git
Thanks for your comment ๐. Once it's approved, it will appear here.
Leave a comment