Skip to content

Commit

Permalink
Added Diagrams for staging areas and commits
Browse files Browse the repository at this point in the history
  • Loading branch information
tdyer committed Sep 28, 2015
1 parent 9383484 commit 3a73041
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ In order for Git to track a file or a set of files it's will be **staged**. You

> Now that Git is tracking the file in it's index we will commit the file.
![Git Staging](images/git-commit-staging.png)

**Git commit the README.**

```bash
Expand All @@ -143,7 +145,6 @@ Initialized the project.
Initialized the project and added a minimal README file.
```

> And look at the project status again.
```bash
Expand All @@ -155,6 +156,10 @@ nothing to commit, working directory clean
> Now that we've commited the file git tells us we're all good, have a *clean working directory*.
> Let's take a look at [Explain Git](http://www.wei-wang.com/ExplainGitWithD3/)
![Git Staging](images/git-staging-area.png)

**View the commit with log.**

> Before we move on lets try one more Git command, ``git log``.
```bash
Expand Down Expand Up @@ -183,8 +188,24 @@ Then commit, write a commit message and check the status.

Then look at the history of commits with ``git log``.


## We Do.

> So now, we have a couple of commits. Each commit refers the previous commit and the *master* branch now points or refers to the most recent commit.
>
> Here we have three commits:
* C0 which was our initial commit when we added the README.
* C1 is the commit where we added the license .
* C2 is some future commit.



![Git Staging](images/git-master-ref.png)

> The master branch is really only a pointer to the a commit! It's moves to the most recent commit by default.

### Create the departments.


Expand Down Expand Up @@ -316,6 +337,15 @@ Meg Brown,978-453-8984,[email protected],manager
```


## I Do

> Now we have two branches. The branch that starts with the first commit, C0, is the master branch.
>
> master has four commits, C0 through C4.
![Git Staging](images/git-commit-graph.png)
> create-departments has two commits, C3 and C5. C3 is the first commit in create-departments and it's predessosor branck was C2.
>
## You Do.

Working with your team/squad. Draw a representation of the git branches and each commit. Don't forget the connection/s between the commit and the multiple branches.
Expand Down
Binary file added images/git-commit-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/git-commit-staging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/git-master-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/git-staging-area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a73041

Please sign in to comment.