معرفی کتاب «Git in Practice: Includes 66 Techniques» نوشتهٔ Mike McQuaid، منتشرشده توسط نشر Manning Publications; Manning در سال 2014. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Git in Practice: Includes 66 Techniques» در دستهٔ بدون دستهبندی قرار دارد.
**Summary** __Git in Practice__ is a collection of 66 tested techniques that will optimize the way you and your team manage your development projects. The book begins with a brief reminder of the core version control concepts you need when using Git and moves on to the high-value features you may not have explored yet. Then, you'll dig into cookbook-style techniques like history visualization, advanced branching and rewriting history each presented in a problem-solution-discussion format. Finally you'll work out how to use Git to its full potential through configuration, team workflows, submodules and using GitHub pull requests effectively. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. **About the Technology** Git is a source control system, but it's a lot more than just that. For teams working in today's agile, continuous delivery environments, Git is a strategic advantage. Built with a decentralized structure that's perfect for a distributed team, Git manages branching, committing, complex merges, and task switching with minimal ceremony so you can concentrate on your code. **About the Book** __Git in Practice__ is a collection of battle-tested techniques designed to optimize the way you and your team manage development projects. After a brief overview of Git's core features, this practical guide moves quickly to high-value topics like history visualization, advanced branching and rewriting, optimized configuration, team workflows, submodules, and how to use GitHub pull requests. Written in an easy-to-follow Problem/Solution/Discussion format with numerous diagrams and examples, it skips the theory and gets right to the nitty-gritty tasks that will transform the way you work. Written for developers familiar with version control and ready for the good stuff in Git. **What's Inside** * Team interaction strategies and techniques * Replacing bad habits with good practices * Juggling complex configurations * Rewriting history and disaster recovery **About the Author** **Mike McQuaid** is a software engineer at GitHub. He's contributed to Qt and the Linux kernel, and he maintains the Git-based Homebrew project. **Table of Contents** ## PART 1 INTRODUCTION TO GIT 2. Local Git 3. Remote Git ## PART 2 GIT ESSENTIALS 5. Filesystem interactions 6. History visualization 7. Advanced branching 8. Rewriting history and disaster recovery ## PART 3 ADVANCED GIT 10. Personalizing Git 11. Vendoring dependencies as submodules 12. Working with Subversion 13. GitHub pull requests 14. Hosting a repository ## PART 4 GIT BEST PRACTICES 16. Creating a clean history 17. Merging vs. rebasing 18. Recommended team workflows Git in Practice 1 brief contents 6 contents 8 foreword 14 preface 16 acknowledgments 18 about this book 19 Roadmap 20 About the code 22 Author Online 22 About the author 22 about the cover illustration 23 Part 1 Introduction to Git 24 1 Local Git 26 1.1 Why do programmers use Git? 26 1.2 Initial setup 27 Technique 1 Creating a repository: git init 28 1.3 .git subdirectory 29 1.4 Creating a new commit: git add, git commit 30 Technique 2 Building a new commit in the index staging area: git add 31 Technique 3 Committing changes to files: git commit 33 1.4.1 Object store 35 1.4.2 Parent commits 36 Technique 4 Viewing history: git log, gitk, gitx 36 1.5 Rewriting history 41 Technique 5 Viewing the differences between commits: git diff 41 1.6 Diff formats 44 1.7 Refs 45 1.8 Summary 46 2 Remote Git 47 Technique 6 Adding a remote repository: git remote add 47 2.1 Authoritative version storage 50 Technique 7 Pushing changes to a remote repository: git push 51 Technique 8 Cloning a remote/GitHub repository onto your local machine: git clone 53 Technique 9 Pulling changes from another repository: git pull 55 Technique 10 Fetching changes from a remote without modifying local branches: git fetch 58 Technique 11 Creating a new local branch from the current branch: git branch 60 Technique 12 Checking out a local branch: git checkout 63 Technique 13 Pushing a local branch remotely 65 Technique 14 Merging an existing branch into the current branch: git merge 67 2.2 Merge conflicts 69 2.3 Rebasing 70 Technique 15 Deleting a remote branch 70 Technique 16 Deleting the current local branch after merging 72 2.4 Summary 73 Part 2 Git essentials 74 3 Filesystem interactions 76 Technique 17 Renaming or moving a file: git mv 77 Technique 18 Removing a file: git rm 78 Technique 19 Resetting files to the last commit: git reset 79 Technique 20 Deleting untracked files: git clean 80 Technique 21 Ignoring files: .gitignore 82 Technique 22 Deleting ignored files 83 Technique 23 Temporarily stashing some changes: git stash 84 Technique 24 Reapplying stashed changes: git stash pop 86 Technique 25 Clearing stashed changes: git stash clear 87 Technique 26 Assuming files are unchanged 87 Technique 27 Listing assumed-unchanged files 88 Technique 28 Stopping assuming files are unchanged 89 3.1 Summary 90 4 History visualization 91 Technique 29 Listing only certain commits 92 4.1 git show 93 Technique 30 Listing commits with different formatting 94 4.2 Custom output format 97 4.3 Releasing logs: git shortlog 98 4.4 The ultimate log output 98 Technique 31 Showing who last changed each line of a file: git blame 99 Technique 32 Finding which commit caused a particular bug: git bisect 101 4.5 Automating git bisect 105 4.6 Summary 106 5 Advanced branching 107 Technique 33 Merging branches and always creating a merge commit 108 5.1 Merge strategies 110 Technique 34 Resolving a merge conflict 111 5.2 Using a graphical merge tool 116 Technique 35 Resolving each merge conflict only once: git rerere 117 Technique 36 Creating a tag: git tag 118 Technique 37 Generating a version number based on previous tags: git describe 120 Technique 38 Adding a single commit to the current branch: git cherry-pick 121 Technique 39 Reverting a previous commit: git revert 124 Technique 40 Listing what branches contain a commit: git cherry 125 5.3 Summary 126 6 Rewriting history and disaster recovery 127 Technique 41 Listing all changes including history rewrites: git reflog 128 6.1 Avoiding and recovering from disasters 129 Technique 42 Resetting a branch to a previous commit: git reset 130 Technique 43 Rebasing commits on top of another branch: git rebase 133 Technique 44 Rebasing commits interactively: git rebase --interactive 137 Technique 45 Pulling a branch and rebasing commits: git pull --rebase 140 Technique 46 Rewriting history on a remote branch: git push --force 142 Technique 47 Rewriting the entire history of a branch: git filter-branch 144 6.2 Summary 148 Part 3 Advanced Git 150 7 Personalizing Git 152 Technique 48 Setting the configuration for all repositories 153 Technique 49 Setting the configuration for a single repository 154 7.1 Useful configuration settings 156 7.1.1 Colored output in Git 156 7.1.2 Git 2.0鈥檚 push defaults 156 7.1.3 Pruning branches automatically 157 7.1.4 Ignoring files across all repositories: global ignore file 157 7.1.5 Displaying help output in your web browser 158 7.1.6 Storing passwords in the OS X keychain 158 7.1.7 Storing arbitrary text in Git configuration 159 7.1.8 Autocorrecting misspelled commands 159 Technique 50 Aliasing commands 160 7.2 Sharing your Git (or other) configuration between machines 161 Technique 51 Showing the current branch in your terminal prompt 162 7.3 Summary 163 8 Vendoring dependencies as submodules 164 8.1 When are submodules useful? 164 Technique 52 Adding a git submodule: git submodule add 166 Technique 53 Showing the status of submodules: git submodule status 169 Technique 54 Updating and initializing all submodules: git submodule update --init 170 Technique 55 Running a command in every submodule: git submodule foreach 172 8.2 Summary 173 9 Working with Subversion 174 Technique 56 Importing an SVN repository into a Git repository 174 9.1 Subversion branches and tags 177 9.2 Subversion ignore rules 178 9.3 Updating a Subversion repository 179 9.4 Subversion authors and committers 181 9.5 Viewing a Subversion repository in GitX 181 9.6 Migrating a Subversion repository to Git 181 Technique 57 Committing and pushing to an SVN repository from a Git repository 182 9.7 Local branching and tagging 183 Technique 58 Accessing a GitHub repository with Subversion 184 9.8 Summary 185 10 GitHub pull requests 186 10.1 What are pull requests and forks? 186 10.2 Interacting with GitHub from the command-line: gh 188 Technique 59 Making a pull request in the same repository: gh pull-request 188 Technique 60 Making a pull request from a forked repository: gh fork 191 Technique 61 Merging a pull request from the same repository 192 Technique 62 Merging a pull request from a forked repository: gh merge 195 10.3 Summary 196 11 Hosting a repository 197 Technique 63 Initializing a local repository in a server hosting format: git init --bare 198 Technique 64 Mirroring a repository: git clone --mirror 199 Technique 65 Sharing a repository with other users on the same network: git daemon 201 Technique 66 Displaying a repository in a browser: git instaweb 203 11.1 Advanced Git hosting 205 11.2 Summary 206 Part 4 Git best practices 208 12 Creating a clean history 210 12.1 Writing a good commit message 210 12.2 Building a commit from parts of files: git add --patch 211 12.3 Graphically building a commit from parts of files 214 12.3.1 Graphically building a commit in GitX 214 12.3.2 Graphically building a commit in Git Gui 216 12.4 Avoiding whitespace issues: git diff --check 217 12.5 Summary 218 13 Merging vs. rebasing 219 13.1 CMake鈥檚 workflow 219 13.1.1 Workflow commands 221 13.2 Homebrew鈥檚 workflow 223 13.2.1 Workflow commands 224 13.3 CMake workflow pros and cons 225 13.4 Homebrew workflow pros and cons 226 13.5 Picking your strategy 227 13.6 Summary 228 14 Recommended team workflows 229 14.1 GitHub Flow 230 14.1.1 Pros and cons 232 14.2 Git Flow 232 14.2.1 Pros and cons 235 14.3 Mike Flow 236 14.3.1 Mike Flow Single 236 14.3.2 Mike Flow Multiple 238 14.3.3 Pros and cons 240 14.4 Which workflow is for you? 241 14.5 Summary 242 appendix A Git installation 244 A.1 How to install and run Git on Apple OS X 244 A.1.1 Installing Git on Apple OS X Mavericks or newer 244 A.1.2 Installing Git on Apple OS X Mountain Lion or older 245 A.2 How to install and run Git on Linux or Unix 245 A.3 How to install and run Git on Microsoft Windows 246 A.4 Verifying that Git has installed correctly 246 appendix B Creating a GitHub account and repository 247 B.1 Signing up for a GitHub account 248 B.2 Creating a new repository on GitHub 250 appendix C Commented Git configuration 252 appendix D Why use version control? 257 D.1 Handling changes 257 D.2 Version control workflow 259 D.3 Version control for programmer collaboration 259 index of Git methods 262 index 264 A 264 B 264 C 265 D 266 E 266 F 266 G 266 H 268 I 268 K 269 L 269 M 269 N 269 O 269 P 269 R 270 S 271 T 271 U 272 V 272 W 272 Y 272 Git in Practice is a collection of 66 tested cookbook-style techniques that will optimize the way you and your team manage your development projects. The book begins with a brief reminder of the core version control concepts you need when using Git and moves on to the high-value features you may not have explored yet. Then, you'll dig into cookbook-style techniques like history visualization, advanced branching, and rewriting history each presented in a problem-solution-discussion format. Finally you'll work out how to use Git to its full potential through configuration, team workflows, submodules, and using GitHub pull requests effectively. Git in Practice is a collection of battle-tested techniques designed to optimize the way you and your team manage development projects. After a brief overview of Git's core features, this practical guide moves quickly to high-value topics like history visualization, advanced branching and rewriting, optimized configuration, team workflows, submodules, and how to use GitHub pull requests. Written in an easy-to-follow Problem/Solution/Discussion format with numerous diagrams and examples, it skips the theory and gets right to the nitty-gritty tasks that will transform the way you work. Summary About the Technology Git is a source control system, but it's a lot more than just that. For teams working in today's agile, continuous delivery environments, Git is a strategic advantage. Built with a decentralized structure that's perfect for a distributed team, Git manages branching, committing, complex merges, and task switching with minimal ceremony so you can concentrate on your code. About the Book Written for developers familiar with version control and ready for the good stuff in Git. What's Inside Team interaction strategies and techniques Replacing bad habits with good practices Juggling complex configurations Rewriting history and disaster recovery About the Author Mike McQuaid is a software engineer at GitHub. He's contributed to Qt and the Linux kernel, and he maintains the Git-based Homebrew project No matter how good a team is, it will flounder if it can't keep the code organized, which can be especially tough when members of the team are spread across multiple locations and time zones. Git is a version control system designed to facilitate work among distributed teams. Git's decentralized architecture, in which each developer maintains a copy of the repository, means that branching and committing are lightning fast. Git manages complex code merges, task switching, and project branching with minimal ceremony, allowing the focus to be on the code instead of tedious administrative tasks. "Git in Practice" is a collection of tested techniques that will optimize the way teams manage their development projects. It begins with a brief refresher of the core version control concepts needed when using Git and moves on to the high-value features readers may not have explored yet. Then, it digs into cookbook-style techniques like history visualization and advanced branching--each presented in a problem-solution-discussion format. Finally, the book shows readers how to use Git to its full potential through configuration, team workflows, submodules, and using GitHub pull requests effectively. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
Git in Practice is a collection of 66 tested techniques that will optimize the way you and your team manage your development projects. The book begins with a brief reminder of the core version control concepts you need when using Git and moves on to the high-value features you may not have explored yet. Then, you'll dig into cookbook-style techniques like history visualization, advanced branching and rewriting history each presented in a problem-solution-discussion format. Finally you'll work out how to use Git to its full potential through configuration, team workflows, submodules and using GitHub pull requests effectively.