Beginning Git and GitHub (eBook)
XIX, 289 Seiten
Apress (Verlag)
978-1-4842-5313-7 (ISBN)
Learn the fundamentals of version control through step-by-step tutorials that will teach you the ins-and-outs of Git. This book is your complete guide to how Git and GitHub work in a professional team environment.
Divided into three parts - Version Control, Project Management and Teamwork - this book reveals what waits for you in the real world and how to resolve the problems you may run into. Once past the basics of Git, you'll see how to manage a software project, and finally how to utilize Git and GithHub to work effectively as a team.
You'll examine how to plan, follow and execute a project with GitHub, and then apply those concepts to real-world situations. Workaround the pitfalls that most programmers fall into when driving a project with Git by using proven tactics to avoid them. You will also be taught the easiest and quickest ways to resolve merge conflicts.
A lot of modern books on Git don't go into depth about non-technical topics. Beginning Git and GitHub will help you cover all the bases right at the start of your career.
What You'll Learn
- Review basic and advanced concepts of Git
- Apply Project Management skills using GitHub
- Solve conflicts or, ideally, avoid them altogether
- Use advanced concepts for a more boosted workflow
Who This book Is For
New developers, developers that have never worked in a team environment before, developers with basic knowledge of Git or GitHub, or anyone who works with text documents.
Mariot Tsitoara is a Python and JavaScript developer with a passion for the Open Web. He has been involved with Mozilla as a Rep and a Tech Speaker since 2015 and has spoken extensively about Open Source and new technology, including Rust, WebVR and online privacy. You can find him on Twitter @mariot_tsitoara.
Learn the fundamentals of version control through step-by-step tutorials that will teach you the ins-and-outs of Git. This book is your complete guide to how Git and GitHub work in a professional team environment. Divided into three parts - Version Control, Project Management and Teamwork - this book reveals what waits for you in the real world and how to resolve the problems you may run into. Once past the basics of Git, you'll see how to manage a software project, and finally how to utilize Git and GithHub to work effectively as a team.You'll examine how to plan, follow and execute a project with GitHub, and then apply those concepts to real-world situations. Workaround the pitfalls that most programmers fall into when driving a project with Git by using proven tactics to avoid them. You will also be taught the easiest and quickest ways to resolve merge conflicts. A lot of modern books on Git don t go into depth about non-technical topics.Beginning Git and GitHub will help you cover all the bases right at the start of your career.What You'll LearnReview basic and advanced concepts of GitApply Project Management skills using GitHub Solve conflicts or, ideally, avoid them altogetherUse advanced concepts for a more boosted workflowWho This book Is For New developers, developers that have never worked in a team environment before, developers with basic knowledge of Git or GitHub, or anyone who works with text documents.
Table of Contents 5
About the Author 12
About the Technical Reviewer 13
Acknowledgments 14
Introduction 15
Part I: Version Control with Git 16
Chapter 1: Version Control Systems 17
What is Version Control? 17
Why do you need one? 18
What are the choices? 21
Local Version Control Systems 21
Centralized Version Control Systems 22
Distributed Version Control Systems 23
What is Git? 25
What can Git do? 25
How does Git work? 26
What is the typical Git workflow? 27
Summary 31
Chapter 2: Installation and Setup 33
Installation 33
Windows 35
Mac 43
Linux 44
Setting up Git 47
Summary 48
Chapter 3: Getting Started 49
Repositories 49
Working Directory 52
Staging Area 54
Commits 55
Quick start with Git 60
Summary 62
Chapter 4: Diving into Git 63
Ignoring files 63
Checking logs and history 69
Viewing previous versions 72
Reviewing the current changes 74
Summary 75
Chapter 5: Commits 76
The three states of Git 76
Navigating between versions 77
Undo a commit 80
Modifying a commit 84
Amending a commit 90
Summary 91
Chapter 6: Git Best Practices 92
Commit messages 92
Git commit best practices 93
What to do 95
What not to do 95
How Git works (again) 97
Summary 99
Chapter 7: Remote Git 100
Why work on remote 100
How does it work 101
The easy way 103
Summary 105
Part II: Project Management with GitHub 106
Chapter 8: GitHub Primer 107
GitHub overview 107
GitHub and Open Source 108
Personal use 113
GitHub for businesses 116
Summary 116
Chapter 9: Quick Start with GitHub 117
Project management 117
How remote repositories work 121
Linking repositories 122
Pushing to remote repositories 125
Summary 130
Chapter 10: Beginning Project Management: Issues 131
Overview on issues 131
Creating an Issue 132
Interacting with an issue 137
Labels 139
Assignees 143
Linking issues with commits 144
Working on the commit 145
Referencing an issue 146
Closing an issue using keywords 150
Summary 152
Chapter 11: Diving into Project Management: Branches 153
GitHub workflow 154
Branches 156
Creating a branch 158
Switching to another branch 159
Deleting a branch 161
Merging branches 163
Pushing a branch to remote 168
Summary 170
Chapter 12: Better Project Management: Pull Requests 171
Why use Pull Requests? 171
Overview on Pull Requests 172
Pull 172
What does a PR do 173
Create a Pull Request 174
Code Reviews 185
Give a Code Review 185
Leave a review comment 186
Update a Pull Request 190
Summary 194
Part III: Teamwork with Git 195
Chapter 13: Conflicts 196
How a merge works 196
Pulling 197
Fast-forward merge 200
Merge conflicts 204
Pulling commits from origin 209
Resolving merge conflicts 215
Summary 221
Chapter 14: More About Conflicts 222
Pushing after a conflict resolution 222
Review changes before merge 223
Check branch location 224
Review branch diff 224
Understand Merging 225
Reducing conflicts 226
Having a good workflow 226
Aborting a merge 227
Using a visual Git tool 228
Summary 228
Chapter 15: Git GUI Tools 229
Default tools 229
Committing: git-gui 229
Browsing: gitk 241
IDE tools 242
Visual Studio Code 242
Atom 244
Specialized tools 245
GitHub Desktop 246
GitKraken 246
Summary 247
Chapter 16: Advanced Git 248
Reverting 248
Stashing 250
Resetting 255
Summary 258
Part IV: Additional Resources 259
Chapter 17: More with GitHub 260
Wikis 260
GitHub Pages 263
Releases 267
Project Boards 270
Summary 274
Chapter 18: Common Git Problems 275
Repository 275
Starting over 275
Change origin 276
Working Directory 277
Git diff is empty 277
Undo changes to a file 278
Commits 278
Error in commit 278
Undo commits 279
Branches 280
Detached HEAD 280
Worked on wrong branch 281
Catch up with parent branch 281
Branches have diverged 283
Summary 285
Chapter 19: Git and GitHub Workflow 286
How to use this workflow 286
GitHub workflow 286
Every project starts with a project 287
Every action starts with an Issue 287
No direct push to master 287
Any merge into master needs a PR 288
Use the wiki to document your code 288
Git workflow 288
Always know where you are 288
Pull remote changes before any action 288
Take care of your commit message 289
Don’t rewrite history 289
Summary 289
Index 290
Erscheint lt. Verlag | 30.11.2019 |
---|---|
Zusatzinfo | XIX, 289 p. 197 illus. |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Web / Internet |
Schlagworte | code reviews • distributed team • Git • GitHub • Open Source • Project Management • social coding • software development • software distribution process • Teamwork • Version Control |
ISBN-10 | 1-4842-5313-2 / 1484253132 |
ISBN-13 | 978-1-4842-5313-7 / 9781484253137 |
Haben Sie eine Frage zum Produkt? |
Größe: 14,9 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich