SlideShare a Scribd company logo
1 of 6
Download to read offline
Integrity


                          气节
Tuesday, January 29, 13

- It’s impossible to change the contents of any file or directory without Git knowing about it

- When you do actions in Git, nearly all of them only add data to the Git database. It is very
difficult to get the system to do anything that is not undoable or to make it erase data in any
way

 As in any VCS, you can lose or mess up changes you haven’t committed yet; but after you
commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your
database to another repository.
index == staging



Tuesday, January 29, 13

it's all about the index
commit == snapshot

                    ‣     not a diff
                    ‣ A commit takes everything in the
                          index and makes a snapshot



Tuesday, January 29, 13
Branches
                          are just pointers to commits




Tuesday, January 29, 13
YOU NEED COLOR
                          git config color.ui auto




Tuesday, January 29, 13
What we’ll do

                          • Exercise in Other Assignments

                          • Mess around with Git Branching


Tuesday, January 29, 13

More Related Content

Viewers also liked

Render Or Redirect?
Render Or Redirect?Render Or Redirect?
Render Or Redirect?Ivan Storck
 
Wine Tasting
Wine TastingWine Tasting
Wine Tastingwinegang
 
Joint Therapies
Joint TherapiesJoint Therapies
Joint Therapiesjimdavis
 
Washington Wines
Washington WinesWashington Wines
Washington Wineswinegang
 
Cucumber exercise slides
Cucumber exercise slidesCucumber exercise slides
Cucumber exercise slidesIvan Storck
 
Hci lecture01 p03
Hci lecture01 p03Hci lecture01 p03
Hci lecture01 p03phanu
 
WordPress Security
WordPress SecurityWordPress Security
WordPress SecurityIvan Storck
 
Rails Request Response Lifecycle
Rails Request Response LifecycleRails Request Response Lifecycle
Rails Request Response LifecycleIvan Storck
 
Bower and Ruby on Rails
Bower and Ruby on RailsBower and Ruby on Rails
Bower and Ruby on RailsIvan Storck
 

Viewers also liked (11)

Render Or Redirect?
Render Or Redirect?Render Or Redirect?
Render Or Redirect?
 
Wine Tasting
Wine TastingWine Tasting
Wine Tasting
 
Joint Therapies
Joint TherapiesJoint Therapies
Joint Therapies
 
Washington Wines
Washington WinesWashington Wines
Washington Wines
 
Testing intro
Testing introTesting intro
Testing intro
 
Cucumber exercise slides
Cucumber exercise slidesCucumber exercise slides
Cucumber exercise slides
 
Hci lecture01 p03
Hci lecture01 p03Hci lecture01 p03
Hci lecture01 p03
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
China
ChinaChina
China
 
Rails Request Response Lifecycle
Rails Request Response LifecycleRails Request Response Lifecycle
Rails Request Response Lifecycle
 
Bower and Ruby on Rails
Bower and Ruby on RailsBower and Ruby on Rails
Bower and Ruby on Rails
 

Integrity and Git's Immutable Nature

  • 1. Integrity 气节 Tuesday, January 29, 13 - It’s impossible to change the contents of any file or directory without Git knowing about it - When you do actions in Git, nearly all of them only add data to the Git database. It is very difficult to get the system to do anything that is not undoable or to make it erase data in any way As in any VCS, you can lose or mess up changes you haven’t committed yet; but after you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository.
  • 2. index == staging Tuesday, January 29, 13 it's all about the index
  • 3. commit == snapshot ‣ not a diff ‣ A commit takes everything in the index and makes a snapshot Tuesday, January 29, 13
  • 4. Branches are just pointers to commits Tuesday, January 29, 13
  • 5. YOU NEED COLOR git config color.ui auto Tuesday, January 29, 13
  • 6. What we’ll do • Exercise in Other Assignments • Mess around with Git Branching Tuesday, January 29, 13