GitHub Essentials
Unleash the power of collaborative workfow development using GitHub, one step at a time Achilleas Pipinellis
BIRMINGHAM - MUMBAI
GitHub Essentials
Copyright 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2015
Production reference: 1280915
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78355-371-6
www.packtpub.com
Credits
Author Copy Editor
Achilleas Pipinellis Trishya Hajare
Reviewer Project Coordinator
Umesh Ram Sharma Shweta H Birwatkar
Commissioning Editor Proofreader
Dipika Gaonkar Safs Editng
Acquisition Editor Indexer
Nikhil Karkal Hemangini Bari
Content Development Editor Production Coordinator
Sumeet Sawant Nitesh Thakur
Technical Editor Cover Work
Saurabh Malhotra Nitesh Thakur
About the Author
Achilleas Pipinellis is an open source enthusiast and tries to get involved in as many projects as possible. He was introduced to Linux almost 10 years ago and hasn't looked back ever since. His distribution of choice is Arch Linux, a lightweight and fexible system that adheres to the KISS philosophy. He is currently working as a system administrator and likes to try new technologies, especially those that require some special deployment. He also enjoys writing technical guides and articles that help people learn about new technologies. He strongly believes that comprehensive documentation is essential to a project's growth and recognition.
In his free time he practices Aikido and enjoys going to conferences that promote the open source movement.
About the Reviewer Umesh Ram Sharma has more than 6 years of experience in the architecture, design, and development of scalable and distributed cloud-based applications. He has a master's degree in computer science and information technology and is also an expert in the practical and technical implementation of various offerings of J2EE stack, Hibernate, and Spring Stack.
He is currently working as a senior software engineer, with a growing interest in the DevOps area. He handles product infrastructure on AWS cloud and develops expertise around automated deployments. He has demonstrated great value by implementing deployment, confguration management with puppet and various technologies, such as AWS Cloud, J2EE, MySql, MongoDB, memcache, Apache Tomcat, and Hazelcast.
www.PacktPub.com Support fles, eBooks, discount offers, and more For support fles and downloads related to your book, please visit www.PacktPub.com .
Did you know that Packt offers eBook versions of every book published, with PDF and ePub fles available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe?
Fully searchable across every book published by Packt Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders If you have an account with Packt at www.PacktPub.com , you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Table of Contents
Chapter 1: Brief Repository Overview and Usage of the Exploring the repository's main page 1
Creating a new repository 2
The commits page and a comparison with the git log command 4 The branches page and a comparison with the git branch command 7 The Raw, Blame, and History buttons 9
The Watch, Star, and Fork buttons 11
Changing the description and URL 12
Learning how to use the powerful benefts of the issue tracker 13 Creating a new issue 14
Assigning issues to users 18
Labels 20 Why labels are a great asset to UX 20
Creating new label names and setting different colors 20
Using labels to group issues 24
Milestones 24 Why milestones are a great help when working with code versioning 24 Creating a new milestone 25
Adding issues to milestones 26
Using milestones to see which issues are resolved or are yet to be resolved 27 Tips and tricks 27
Learning about the README fle 27
Navigating easily with keyboard shortcuts 28
Summary 28 Using the wiki 29
Why wikis are a nice place to document your project 30 Create a new wiki page 30
Deleting a page 32
A Markdown-powered wiki an introduction to Markdown 33 How to add a sidebar and a footer to your wiki 35
Watching a wiki page's commit history and reverting to a previous state if needed 38
Managing code versioning 41
Creating a release 41
Editing a release 45
Pushing a tag from the command line 46
Marking as prerelease 46
Making a draft of a release 48
Uploading your own fles 48
Tips and tricks 49
Subscribing to new releases via atom feed 50
Editing the wiki locally 50
Installing gollum 50
Cloning the wiki and see the preview in your browser 50
Making changes locally and pushing to GitHub 51
Summary 52 The difference between users and organizations 53 Organization roles and repository permission levels 54 Creating an organization 55
Global member privileges 58
Repositories 60 Teams a great way to grant selective access to your organization projects 62
Creating a team 62
Inviting people 65
Accepting an invitation 68
Team members permissions 69
Request to join a team 71
Step 1 as a user 71
Step 2 as a user 71
Step 3 as an owner or team maintainer 72
Adding repositories to a team 72
The People tab 74
Managing access levels 76
Difference between Members and Outside collaborators 79 Demoting to an outside collaborator 81
Invite members 82