Professional Git

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Professional Git takes a professional approach to learning this massively popular software development tool, and provides an up-to-date guide for new users. More than just a development manual, this book helps you get into the Git mindset—extensive discussion of corollaries to traditional systems as well as considerations unique to Git help you draw upon existing skills while looking out—and planning for—the differences. Connected labs and exercises are interspersed at key points to reinforce important concepts and deepen your understanding, and a focus on the practical goes beyond technical tutorials to help you integrate the Git model into your real-world workflow. Git greatly simplifies the software development cycle, enabling users to create, use, and switch between versions as easily as you switch between files. This book shows you how to harness that power and flexibility to streamline your development cycle. - Understand the basic Git model and overall workflow - Learn the Git versions of common source management concepts and commands - Track changes, work with branches, and take advantage of Git's full functionality - Avoid trip-ups and missteps common to new users Git works with the most popular software development tools and is used by almost all of the major technology companies. More than 40 percent of software developers use it as their primary source control tool, and that number continues to grow; the ability to work effectively with Git is rapidly approaching must-have status, and Professional Git is the comprehensive guide you need to get up to speed quickly.

Author(s): Brent Laster
Publisher: Wrox
Year: 2016

Language: English
Commentary: True PDF + ToC
Pages: 454
Tags: Git;Programming;Open Source;Software;Version control systems;VCS;source management;Version control;

Cover......Page 1
Title Page......Page 5
Copyright......Page 6
About the Technical Proofreader......Page 9
Credits......Page 11
Acknowledgments......Page 13
Contents......Page 15
How This Book is Unique......Page 25
Structure and Content......Page 26
Next Steps......Page 27
Part I Understanding Git Concepts......Page 29
Chapter 1: What is Git?......Page 31
Industry-Standard Tooling......Page 32
Core Git......Page 33
Git-Hosting Sites......Page 34
Self-Hosting Packages......Page 35
Ease-of-Use Packages......Page 36
Git Libraries......Page 38
The Advantages......Page 39
The Challenges......Page 42
Summary......Page 46
Design Concepts: User-Facing......Page 47
Distributed Model......Page 48
Delta Storage......Page 50
Git’s Storage Requirements......Page 51
Repository Scope......Page 53
File Scope......Page 55
Summary......Page 57
The Levels of Git......Page 59
Dev-Test-Prod and Git......Page 60
The Core Git Commands for Moving Content......Page 67
Summary......Page 69
About Connected Lab 1: Installing Git......Page 70
Steps......Page 71
Installing Git on Linux......Page 74
Part II Using Git......Page 75
Executing Commands in Git......Page 77
Operand Types......Page 78
Porcelain versus Plumbing Commands......Page 79
Specifying Arguments......Page 81
Auto-complete......Page 82
Configuring Git......Page 83
Telling Git Who You Are......Page 84
Configuration Scope......Page 85
Default Editor......Page 88
End of Line Settings......Page 89
Aliases......Page 91
Git Init......Page 92
Git Clone......Page 93
Advanced Topics......Page 94
Looking Further into a Git Repository......Page 95
Mapping Config Commands to Configuration Files......Page 97
Creating Parameterized Aliases......Page 98
Summary......Page 99
Getting Help......Page 101
The Multiple Repositories Model......Page 104
Adding Content to Track—Add......Page 105
Staging Scope......Page 106
Finalizing Changes—Commit......Page 114
Prerequisites......Page 115
Amending Commits......Page 116
Results of a Commit......Page 119
Advanced Topics......Page 122
The Full Commit Message Experience......Page 123
Autocorrect and Auto Execute......Page 124
About Connected Lab 2: Creating and Exploring a Git Repository and Managing Content......Page 125
Steps......Page 127
Git Status......Page 133
Workflow Example with Status......Page 134
Status Command Short Form......Page 138
Git Diff......Page 139
How to Think about Git’s Approach to Diffing......Page 140
Diff Names Only......Page 143
Ignoring Non-critical Changes......Page 144
Diffing Two Commits......Page 146
Visual Diffing......Page 149
Other Diff Tricks......Page 152
About Connected Lab 3: Tracking Content through the File Status Life Cycle......Page 153
Steps......Page 155
Chapter 7: Working with Changes over Time and Using Tags......Page 159
Common Display and Filtering Options......Page 160
Time-Limiting Options......Page 161
History by Files and Paths......Page 162
Log Output Format......Page 163
Searching History......Page 164
Git Blame......Page 166
Seeing History Visually......Page 168
Tags......Page 169
Seeing Tag Details......Page 170
Modifying Tags......Page 171
Quick Tagging Example......Page 172
Reset—Rolling Back Changes......Page 173
Completely Resetting the Local Environment......Page 174
Revert—Canceling Out Changes......Page 175
Signing Commits and Tags......Page 179
Reflogs......Page 181
About Connected Lab 4: Using Git History, Tags, and Aliases......Page 182
Steps......Page 183
What Is a Branch?......Page 187
The Git Model of Branches......Page 188
Creating a Branch......Page 190
Checking Out a Branch......Page 191
One Working Directory—Many Branches......Page 192
Getting Information about Branches......Page 196
Deleting or Renaming a Branch......Page 197
Developing with Branches......Page 200
Advanced Topics......Page 208
Checking Out Non-branch Commits......Page 209
Checking Out Individual Files......Page 214
Summary......Page 215
About Connected Lab 5: Working with Branches......Page 216
Steps......Page 217
Chapter 9: Merging Content......Page 221
Preparing for a Merge......Page 222
Types of Merges......Page 223
Rebasing—Merging with History......Page 227
Cherry-Picking......Page 231
Differences between Cherry-Pick and Rebase......Page 233
Merge Operations......Page 234
Merging Is a State......Page 238
Error Messages for Conflicts......Page 239
Aborting the Operation......Page 240
Dealing with Conflicts—the Workflow......Page 241
Resolution Options and Strategies......Page 245
Visual Merging......Page 251
Making Merge Tools Available to Git......Page 254
Alternative Style for Conflict Markers......Page 255
Advanced Rebasing Scenario......Page 257
Interactive Rebasing......Page 262
Summary......Page 269
About Connected Lab 6: Practicing with Merging......Page 270
Steps......Page 271
Chapter 10: Supporting Files in Git......Page 273
The Scope of Git Attributes......Page 274
The File Format......Page 276
Common Use Cases......Page 277
The Git Ignore File......Page 284
The Scope of Git Ignore......Page 285
The File Format......Page 286
Getting Ignore Information for Files......Page 288
Summary......Page 289
Modifying the Layout of Files and Directories in Your Local Environment......Page 291
stash......Page 292
Staging Commands......Page 298
mv......Page 299
Commands for Searching......Page 300
grep......Page 301
Git Log Searches......Page 303
archive......Page 306
bundle......Page 307
Sharing Patches through E-mail......Page 308
apply......Page 309
am......Page 310
Mailing Patch Files......Page 311
Commands for Cleaning Up......Page 313
clean......Page 314
notes......Page 316
Advanced Topics......Page 318
rev-list......Page 319
bisect......Page 326
rerere......Page 334
Summary......Page 342
About Connected Lab 7: Deleting, Renaming, and Stashing......Page 343
Steps......Page 345
Chapter 12: Understanding Remotes—Branches and Operations......Page 349
Remotes......Page 350
Remote Access Protocols......Page 352
The Remote Command......Page 354
Remote Tracking Branches......Page 356
Git Clone......Page 358
Viewing Information about Remote Branches......Page 361
Push......Page 366
Fetch......Page 374
Pull......Page 377
About Connected Lab 8: Setting Up a GitHub Account and Cloning a Repository......Page 380
Steps......Page 381
Chapter 13: Understanding Remotes—Workflows for Changes......Page 383
How the Remote Side Handles Conflicts......Page 384
Hosted Repositories......Page 396
Models for Collaboration with Git......Page 397
Putting It All Together......Page 402
About Connected Lab 9: Using the Overall Workflow with a Remote Repository......Page 403
Steps......Page 405
Worktrees......Page 409
Adding a Worktree......Page 410
Pruning a Worktree......Page 413
Submodules......Page 414
Adding a Submodule......Page 416
Determining Submodule Status......Page 417
Processing Multiple Submodules......Page 421
Updating Submodules from Their Remotes......Page 422
Viewing Submodule Differences......Page 424
Superproject versus Submodules......Page 425
Updating the Submodule References......Page 427
Updating Submodules When the Superproject Is Updated......Page 429
Pushing Changes from Submodules......Page 430
Unregistering a Submodule......Page 432
Subtrees......Page 433
Adding a Project as a Subtree......Page 435
Updating a Subtree......Page 437
Creating a New Project from the Split Content......Page 438
About Connected Labs 10–12......Page 439
About Connected Lab 12: Working with Subtrees......Page 440
Steps......Page 441
Steps......Page 443
Steps......Page 447
Chapter 15: Extending Git Functionality with Git Hooks......Page 451
Installing Hooks......Page 452
Hook Domain......Page 453
Working Directory Access......Page 454
Pre-applypatch......Page 455
Pre-commit......Page 456
Prepare-commit-msg......Page 457
Commit-message......Page 459
Post-commit......Page 460
Pre-rebase......Page 461
Pre-push......Page 462
Pre-receive......Page 463
Post-receive......Page 464
Post-update......Page 465
Post-rewrite......Page 466
Hooks Quick Reference......Page 467
Summary......Page 469
Index......Page 471
EULA......Page 483