Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Git Basics Getting Started With Git The Staging Area

what is Staging Area?

a

1 Answer

Stone Preston
Stone Preston
42,016 Points

from the git documentation on git basics:

The staging area is a file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the “index”, but it’s also common to refer to it as the staging area.

The basic Git workflow goes something like this:

You modify files in your working directory.

You stage the files, adding snapshots of them to your staging area.

You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.

Basically, you add the files you want to commit to the "staging area." Once you are ready to commit these files, you commit them and all the files that were placed in the staging area are commited

gitready.com describes the staging area as:

basically a loading dock where you get to determine what changes get shipped away.

Too canned answer & you need to have a certain level of prior understanding to get a copy/paste answer.