What is the Git Working Tree? or working Area

What is the Git Working Tree? or working Area

About

The working tree (or working area) is a root directory and all its sub-directories where the work on your files happens (extraction, modification, commit).

Root

The location of the root work tree is:

It's called a tree because the directory is synchronized by git in the git repository as a tree object.

Usage

It's an file system tree (area) where:

  • you can browse and modify your files with your file explorer.
  • you will see all modified file that are not yet committed. Before running the commit command, you must use the add command to add any new or modified files to the index (staging area)

Management

Purge

If you want to your working directory back to the status of upstream (server repo), the following commands can be used (remember everything you've worked on is gone after these):

git reset --hard upstream/master
git clean -fdx





Discover More
Git

is a content-addressable file system used to track directory tree content (as defined by its creator Linux Torvald) It's not a version control...
Git - Clone

git clone creates a clone known as local repository from a remote repository. cloning in git means: downloading the remote repository into a newly created directory setting for each downloaded branch...
Git Commit Tree Data Model
Git - Commit

A commit in git is an object that stores the information : who saved the file system snapshots, when they were saved, why they were saved. the commiter the author the parent commit It's...
Git - Conflict resolution

In case of conflict during a merge, the working tree files will include a description of the conflict bracketed by the usual conflict markers <<<<<<< and >>>>>>>. For the marker, Git uses the same style...
Git - Current / working / HEAD / active branch

The current or active branch is: the branch checked out actually in the working tree The current branch is also known as the HEAD branch (in uppercase) that represents the last commit known...
Git - Database

The git core database is a key store value where a key value entry is known as an object. (All data in Git are objects) The database is mostly composed: of tree of object ... and commit...
Git - File (Blob)

File management in Git (blob and not directory) blob object on the local file system or not (ie in the git file system database) See and short status A file (or blob) identifier is the...
Git - Git (executable|command line)

The git executable where: --git-dir is the location of the repository files --work-tree is the location of the work tree Command Description add Add file contents to the index add--interactive...
Git - Stash

git stash stashes the changes in a dirty working directory away before a pull/merge to bring them back later with a local merge. merge (pull do a fetch and merge) git stash pop pops the top stash...
Git - Working Directory

A page the working directory in git (ie where the git process will start, not to confound with the working area) If the -C path option Doc, the working directory will...



Share this page:
Follow us:
Task Runner