مشخصات کتاب
-
Ben Lynn
-
2007
-
انگلیسی
-
22338
-
468
-
0
Git Magic
Table of Contents
Preface ......................................................................................................................................................vi
1. Thanks!.........................................................................................................................................vi
2. License ....................................................................................................................................... vii
1. Introduction...........................................................................................................................................1
1.1. Work is Play ...............................................................................................................................1
1.2. Version Control ...........................................................................................................................1
1.3. Distributed Control......................................................................................................................1
1.4. A Silly Superstition .....................................................................................................................2
1.5. Merge Conflicts..........................................................................................................................3
2. Basic Tricks ...........................................................................................................................................4
2.1. Saving State................................................................................................................................4
2.2. Add, Delete, Rename ..................................................................................................................4
2.3. Advanced Undo/Redo .................................................................................................................5
2.4. Reverting ....................................................................................................................................6
2.5. Changelog Generation.................................................................................................................6
2.6. Downloading Files ......................................................................................................................6
2.7. The Bleeding Edge......................................................................................................................7
2.8. Instant Publishing.......................................................................................................................7
2.9. What Have I Done?.....................................................................................................................8
2.10. Exercise ....................................................................................................................................8
3. Cloning Around ..................................................................................................................................10
3.1. Sync Computers ........................................................................................................................10
3.2. Classic Source Control..............................................................................................................10
3.3. Secret Source............................................................................................................................11
3.4. Bare repositories .......................................................................................................................12
3.5. Push versus pull.........................................................................................................................12
3.6. Forking a Project .......................................................................................................................12
3.7. Ultimate Backups......................................................................................................................13
3.8. Light-Speed Multitask...............................................................................................................13
3.9. Guerilla Version Control ...........................................................................................................13
3.10. Mercurial................................................................................................................................14
3.11. Bazaar.....................................................................................................................................15
3.12. Why I use Git ..........................................................................................................................15
4. BranchWizardry ................................................................................................................................17
4.1. The Boss Key ............................................................................................................................17
4.2. Dirty Work ...............................................................................................................................18
4.3. Quick Fixes ...............................................................................................................................18
4.4. Merging ....................................................................................................................................19
4.5. Uninterrupted Workflow ...........................................................................................................20
4.6. Reorganizing a Medley .............................................................................................................21
4.7. Managing Branches...................................................................................................................21
4.8. Temporary Branches .................................................................................................................22
4.9. Work How You Want ................................................................................................................22
5. Lessons of History...............................................................................................................................23
5.1. I Stand Corrected ......................................................................................................................23
5.2. . . . And Then Some...................................................................................................................23
5.3. Local Changes Last...................................................................................................................24
5.4. Rewriting History......................................................................................................................25
5.5. Making History .........................................................................................................................25
5.6. Where Did It All Go Wrong?....................................................................................................27
5.7. Who Made It All Go Wrong? ...................................................................................................27
5.8. Personal Experience..................................................................................................................28
6. Multiplayer Git ...................................................................................................................................29
6.1. Who Am I?...............................................................................................................................29
6.2. Git Over SSH, HTTP ................................................................................................................29
6.3. Git Over Anything.....................................................................................................................30
6.4. Patches: The Global Currency ..................................................................................................30
6.5. Sorry, We’ve Moved..................................................................................................................31
6.6. Remote Branches ......................................................................................................................32
6.7. Multiple Remotes......................................................................................................................33
6.8. My Preferences .........................................................................................................................33
7. Git Grandmastery...............................................................................................................................35
7.1. Source Releases........................................................................................................................35
7.2. Commit What Changed.............................................................................................................35
7.3. My Commit Is Too Big!............................................................................................................35
7.4. The Index: Git’s Staging Area ..................................................................................................36
7.5. Don’t Lose Your HEAD............................................................................................................36
7.6. HEAD-hunting ..........................................................................................................................37
7.7. Building On Git.........................................................................................................................38
7.8. Daring Stunts............................................................................................................................39
7.9. Preventing Bad Commits ..........................................................................................................39
8. Secrets Revealed..................................................................................................................................41
8.1. Invisibility ................................................................................................................................41
8.2. Integrity ....................................................................................................................................41
8.3. Intelligence...............................................................................................................................41
8.4. Indexing....................................................................................................................................42
8.5. Git’s Origins.............................................................................................................................42
8.6. The Object Database .................................................................................................................42
8.7. Blobs ........................................................................................................................................42
8.8. Trees .........................................................................................................................................43
8.9. Commits ...................................................................................................................................44
8.10. Indistinguishable From Magic ................................................................................................45
A. Git Shortcomings ...............................................................................................................................47
A.1. SHA1 Weaknesses....................................................................................................................47
A.2. Microsoft Windows..................................................................................................................47
A.3. Unrelated Files .........................................................................................................................47
A.4. Who’s Editing What?...............................................................................................................47
A.5. File History..............................................................................................................................48
A.6. Initial Clone.............................................................................................................................48
A.7. Volatile Projects.......................................................................................................................48
A.8. Global Counter .........................................................................................................................49
A.9. Empty Subdirectories ...............................................................................................................49
A.10. Initial Commit ........................................................................................................................49
A.11. Interface Quirks......................................................................................................................50
B. Translating This Guide.......................................................................................................................51