Download Git Magic - Student Information
Transcript
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. Branch Wizardry .................................................................................................................................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 iii