On Mon, 27 Apr 2015 09:34:10 -0700 (PDT)
Pawel Por <porpa...@gmail.com> wrote:

> Is there any difference between working copy and working directory ?
> If so what's the difference ?

Officially, Git uses the terms "work tree" and "working tree" to refer
to a directory which contains files you're working on.

In more technical terms, this is the directory which content Git
uses to physically represent what's recorded in its index (also called
"the staging area").  That is, when you `git checkout` a branch (or
directly a revision), Git first populates its index with the state of
all the files representing your project at that branch/revision and then
updates the work tree.  When you run `git status` Git as well compares
what's in the index with what's in the work tree.

As to the validity of your terminology, this is a philosophical
question ;-)  As you can see, from a purist approach, all the terms you
mentioned are incorrect, but from a more down-to-earth standpoint they
seem to be mostly OK.  "Mostly", because you should be careful with the
term "working directory": this is a concept existing in many (most?)
popular operating systems in wide use today, and it means a special
property of any running process (a program being executed).  This
property contains the path name of a directory that process explicitly
set as its current, or inherited from its parent process.  This
property is needed for the operating system to know what to do if the
process asks it to access a file with a relative name, like in «hey, OS,
please open a file named "foo/bar.txt"»; in this case the OS gets the
working directory of that process, prepends its name to the name of the
file it was asked to open and proceeds with the request.  The working
directory is also the current directory in a shell -- that is, the
thing you operate with the `cd` command in most shells.

"Working copy" is better but then again, what is it a copy of?

Note that those coming from Subversion and some other popular SCMs
might use the term "checkout" or "current checkout" even though this
usage is quite dubious when it comes to Git.

In the end, when talking about Git, I'd stick to "work tree" or
"working tree".

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to