وبلاگ بلیان

Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development

معرفی کتاب «Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development» نوشتهٔ Jon Loeliger، منتشرشده توسط نشر O'Reilly Media در سال 2009. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development» در دستهٔ بدون دسته‌بندی قرار دارد.

Version Control with Git takes you step-by-step through ways to track, merge, and manage software projects, using this highly flexible, open source version control system. Git permits virtually an infinite variety of methods for development and collaboration. Created by Linus Torvalds to manage development of the Linux kernel, it's become the principal tool for distributed version control. But Git's flexibility also means that some users don't understand how to use it to their best advantage. Version Control with Git offers tutorials on the most effective ways to use it, as well as friendly yet rigorous advice to help you navigate Git's many functions. With this book, you will: Learn how to use Git in several real-world development environments Gain insight into Git's common-use cases, initial tasks, and basic functions Understand how to use Git for both centralized and distributed version control Use Git to manage patches, diffs, merges, and conflicts Acquire advanced techniques such as rebasing, hooks, and ways to handle submodules (subprojects) Learn how to use Git with Subversion Git has earned the respect of developers around the world. Find out how you can benefit from this amazing tool with Version Control with Git . Table of Contents 7 Preface 13 Audience 13 Assumed Framework 13 Book Layout and Omissions 13 Conventions Used in This Book 15 Using Code Examples 16 Safari® Books Online 16 How to Contact Us 16 Acknowledgments 17 Chapter 1. Introduction 19 Background 19 The Birth of Git 20 Precedents 22 Time Line 23 What’s in a Name? 24 Chapter 2. Installing Git 25 Using Linux Binary Distributions 25 Debian/Ubuntu 25 Other Binary Distributions 26 Obtaining a Source Release 27 Building and Installing 27 Installing Git on Windows 29 Installing the Cygwin Git Package 30 Installing Standalone Git (msysGit) 31 Chapter 3. Getting Started 35 The Git Command Line 35 Quick Introduction to Using Git 37 Creating an Initial Repository 37 Adding a File to Your Repository 38 Configuring the Commit Author 40 Making Another Commit 40 Viewing Your Commits 40 Viewing Commit Differences 42 Removing and Renaming Files in Your Repository 42 Making a Copy of Your Repository 43 Configuration Files 44 Configuring an Alias 46 Inquiry 46 Chapter 4. Basic Git Concepts 47 Basic Concepts 47 Repositories 47 Git Object Types 48 Index 49 Content-Addressable Names 49 Git Tracks Content 50 Pathname Versus Content 51 Object Store Pictures 51 Git Concepts at Work 54 Inside the .git directory 54 Objects, Hashes, and Blobs 55 Files and Trees 56 A Note on Git’s Use of SHA1 57 Tree Hierarchies 59 Commits 60 Tags 61 Chapter 5. File Management and the Index 63 It’s All About the Index 64 File Classifications in Git 64 Using git add 66 Some Notes on Using git commit 68 Using git commit --all 68 Writing Commit Log Messages 69 Using git rm 70 Using git mv 72 A Note on Tracking Renames 73 The .gitignore File 74 A Detailed View of Git’s Object Model and Files 76 Chapter 6. Commits 81 Atomic Changesets 82 Identifying Commits 83 Absolute Commit Names 83 refs and symrefs 84 Relative Commit Names 85 Commit History 87 Viewing Old Commits 87 Commit Graphs 90 Using gitk to view the commit graph 93 Commit Ranges 94 Finding Commits 99 Using git bisect 99 Using git blame 103 Using Pickaxe 104 Chapter 7. Branches 105 Reasons for Using Branches 105 Branch Names 106 Dos and Don’ts in Branch Names 107 Using Branches 107 Creating Branches 108 Listing Branch Names 110 Viewing Branches 110 Checking Out Branches 112 A Basic Example of Checking Out a Branch 113 Checking Out When You Have Uncommitted Changes 114 Merging Changes into a Different Branch 115 Creating and Checking Out a New Branch 117 Detached HEAD Branches 118 Deleting Branches 119 Chapter 8. Diffs 123 Forms of the git diff Command 124 Simple git diff Example 128 git diff and Commit Ranges 131 git diff with Path Limiting 134 Comparing How Subversion and Git Derive diffs 136 Chapter 9. Merges 137 Merge Examples 137 Preparing for a Merge 138 Merging Two Branches 138 A Merge with a Conflict 140 Working with Merge Conflicts 144 Locating Conflicted Files 144 Inspecting Conflicts 145 git diff with conflicts 146 git log with conflicts 148 How Git Keeps Track of Conflicts 149 Finishing Up a Conflict Resolution 151 Aborting or Restarting a Merge 153 Merge Strategies 153 Degenerate Merges 156 Normal Merges 158 Recursive merges 158 Octopus merges 159 Specialty Merges 159 Applying Merge Strategies 160 Merge Drivers 162 How Git Thinks About Merges 162 Merges and Git’s Object Model 162 Squash Merges 163 Why Not Just Merge Each Change One by One? 164 Chapter 10. Altering Commits 167 Caution About Altering History 169 Using git reset 170 Using git cherry-pick 177 Using git revert 179 reset, revert, and checkout 179 Changing the Top Commit 181 Rebasing Commits 183 Using git rebase -i 185 rebase Versus merge 189 Chapter 11. Remote Repositories 195 Repository Concepts 196 Bare and Development Repositories 196 Repository Clones 197 Remotes 198 Tracking Branches 198 Referencing Other Repositories 199 Referring to Remote Repositories 200 The refspec 201 Example Using Remote Repositories 203 Creating an Authoritative Repository 204 Make Your Own origin Remote 205 Developing in Your Repository 207 Pushing Your Changes 207 Adding a New Developer 208 Getting Repository Updates 210 The fetch step 212 The merge or rebase step 213 Remote Repository Operations in Pictures 214 Cloning a Repository 215 Alternate Histories 216 Non-Fast-Forward Pushes 217 Fetching the Alternate History 218 Merging Histories 219 Merge Conflicts 220 Pushing a Merged History 221 Adding and Deleting Remote Branches 221 Remote Configuration 222 git remote 223 git config 223 Manual Editing 224 Bare Repositories and git push 224 Publishing Repositories 226 Repositories with Controlled Access 226 Repositories with Anonymous Read Access 228 Publishing Repositories Using git-daemon 228 Publishing repositories using an HTTP daemon 230 Publishing using Git and HTTP daemons 230 Repositories with Anonymous Write Access 231 Chapter 12. Repository Management 233 Repository Structure 233 The Shared Repository Structure 233 Distributed Repository Structure 234 Repository Structure Examples 235 Living with Distributed Development 237 Changing Public History 237 Separate Commit and Publish Steps 238 No One True History 238 Knowing Your Place 239 Upstream and Downstream Flows 240 The Maintainer and Developer Roles 240 Maintainer-Developer Interaction 241 Role Duality 242 Working with Multiple Repositories 243 Your Own Workspace 243 Where to Start Your Repository 244 Converting to a Different Upstream Repository 245 Using Multiple Upstream Repositories 247 Forking Projects 249 Isn’t forking a project bad? 249 Reconciling forks 250 Chapter 13. Patches 251 Why Use Patches? 252 Generating Patches 253 Patches and Topological Sorts 260 Mailing Patches 261 Applying Patches 264 Bad Patches 271 Patching Versus Merging 271 Chapter 14. Hooks 273 Installing Hooks 275 Example Hooks 275 Creating Your First Hook 276 Available Hooks 278 Commit-Related Hooks 278 Patch-Related Hooks 279 Push-Related Hooks 280 Other Local Repository Hooks 281 Chapter 15. Combining Projects 283 The Old Solution: Partial Checkouts 284 The Obvious Solution: Import the Code into Your Project 285 Importing Subprojects by Copying 287 Importing Subprojects with git pull -s subtree 287 Submitting Your Changes Upstream 291 The Automated Solution: Checking Out Subprojects Using Custom Scripts 292 The Native Solution: gitlinks and git submodule 293 gitlinks 294 The git submodule Command 296 Chapter 16. Using Git with Subversion Repositories 301 Example: A Shallow Clone of a Single Branch 301 Making Your Changes in Git 304 Fetching Before Committing 305 Committing Through git svn rebase 306 Pushing, Pulling, Branching, and Merging with git svn 308 Keeping Your Commit IDs Straight 308 Cloning All the Branches 310 Sharing Your Repository 311 Merging Back into Subversion 312 How dcommit handles merges 313 Miscellaneous Notes on Working with Subversion 314 svn:ignore Versus .gitignore 314 Reconstructing the git-svn cache 315 Index 317 __Version Control with Git__ takes you step-by-step through ways to track, merge, and manage software projects, using this highly flexible, open source version control system. Git permits virtually an infinite variety of methods for development and collaboration. Created by Linus Torvalds to manage development of the Linux kernel, it's become the principal tool for distributed version control. But Git's flexibility also means that some users don't understand how to use it to their best advantage. __Version Control with Git__ offers tutorials on the most effective ways to use it, as well as friendly yet rigorous advice to help you navigate Git's many functions. With this book, you will: * Learn how to use Git in several real-world development environments * Gain insight into Git's common-use cases, initial tasks, and basic functions * Understand how to use Git for both centralized and distributed version control * Use Git to manage patches, diffs, merges, and conflicts * Acquire advanced techniques such as rebasing, hooks, and ways to handle submodules (subprojects) * Learn how to use Git with Subversion Git has earned the respect of developers around the world. Find out how you can benefit from this amazing tool with __Version Control with Git__. Version Control with Git takes you step-by-step through ways to track, merge, and manage software projects, using this highly flexible, open source version control system. Git permits virtually an infinite variety of methods for development and collaboration. Created by Linus Torvalds to manage development of the Linux kernel, it's become the principal tool for distributed version control. But Git's flexibility also means that some users don't understand how to use it to their best advantage. Version Control with Git offers tutorials on the most effective ways to use it, as well as friendly yet rigorous advice to help you navigate Git's many functions. With this book, you will:
دانلود کتاب Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development