Book Image

Git: Version Control for Everyone

By : Ravishankar Somasundaram
Book Image

Git: Version Control for Everyone

By: Ravishankar Somasundaram

Overview of this book

<div> <div>Git – is free software which enables you to maintain different versions of single or multiple files present inside a directory(folder), and allows you to switch back and forth between them at any given point of time. It also allows multiple people to work on the same file collaboratively or in parallel, without being connected to a server or any other centralized system continuously.<br /><br />This book is a step by step, practical guide, helping you learn the routine of version controlling all your content, every day. <br /><br />If you are an average computer user who wants to be able to maintain multiple versions of files and folders, or to go back and forth in time with respect to the files content – look no further. The workflow explained in this book will benefit anyone, no matter what kind of text or documentation they work on.<br /><br />This book will also benefit developers, administrators, analysts, architects and anyone else who wishes to perform simultaneous, collaborative work, or work in parallel on the same set of files. Git's advanced features are there to make your life easier.<br /><br /><br /><br /><br /><br /></div> </div>
Table of Contents (16 chapters)
Git: Version Control for Everyone Beginner's Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

This book is a non-coder's guide to get a kick start in using the Git version control system on a daily basis to improve their efficiency and productivity when dealing with all forms of electronic data.

With step-by-step examples and illustrative screenshots, you will be guided through the process of installing, configuring, and mastering the concepts needed to version control your data with the help of the best in class tool, Git.

Concepts in every chapter are explained through simple, day-to-day examples and interesting analogies which makes the learning itself an experience to cherish.

Specifically catered to address the needs of an audience from diverse backgrounds using multiple operating systems such as Microsoft Windows, Linux, and Mac OS, all illustrations are explained using both Graphical User Interface (GUI) and Command-Line Interface (CLI) modes.

The final chapter is dedicated to readers who want to understand the behind the scenes operations of Git's functions which they performed in all other chapters, in simple terms. This will also interest people who have been using Git prior to this book.

By the end of the book, you will not only gain theoretical knowledge but also a hands-on practical understanding and experience about the concepts which are needed to make a difference in the way you deal with digital files.

This book can also be used as a reference or to relearn the concepts that have been discussed in each chapter. It has illustrative examples, wherever necessary, to make sure it is easy to follow.

What this book covers

Chapter 1, Breathe Easy – Introduction to Version Control System, introduces the concept of version controlled systems, its necessity along with its evolution, and more importantly why Git is considered to be the best in class.

Chapter 2, Welcome Aboard – Installing Git, guides you through the installation of Git, specific to your operating system.

Chapter 3, Polishing Your Routine – How to Increase Everyday Productivity, teaches you five basic, important concepts (initiate your repository, add your files to it, start versioning by committing them, travel back using checkout, and reset whenever it is needed) which is all you need to get started with versioning your files using Git.

Chapter 4, Split the Load – Distributed Working with Git, teaches you the essentials of collaborative development by sharing content with others over multiple mediums such as the Internet and intranet and explores various methods to continue the work from different locations with different people.

Chapter 5, Be a Puppet Master – Learn Fancy Features to Control Git's Functions, teaches you a few tips and tricks which can be implemented in various situations to change Git's usual behavior pertaining to the functions which we have come across in earlier chapters.

Chapter 6, Unleash the Beast – Git on Text-based Files, exposes to you a new feature called merging that is considered to be one of the hallmarks of Git. You will learn how to merge content and solve conflicts caused by such merges.

Chapter 7, Parallel Dimensions – Branching with Git, introduces one of Git's most applauded features, the concept called branching, its importance, and the ways it can be implemented to transform your mode of work.

Chapter 8, Behind the Scenes – Basis of Git Basics, takes a deep dive into Git's internals and puts it in simple terms. You will get to know the underlying operations which Git performed when you executed the various Git commands in all of the earlier chapters.

What you need for this book

The basic requirement for learning the concepts in this book will be an administrative (or at least installation) access to a machine running a Windows, Linux, or Mac operating system. And occasionally, Internet connectivity for the said machine.

Apart from this, it's good to have your favorite text editor along with a zip utility (your machine will have one by default) and an office package such as MS Office, OpenOffice, and LibreOffice to create word documents.

Who this book is for

This book is for any one who is computer literate and wants to maintain multiple versions of his/her files in an efficient manner and travel back in time to visit such different versions without juggling numerous files along with their confusing names stored at different locations.

This book is even for people who have prior experience with Git or any other version control system, as they will pick up interesting points from the final chapter which is focused on Git's internals put in simple terms.

Conventions

In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Time for action – heading

  1. Action 1

  2. Action 2

  3. Action 3

Instructions often need some extra explanation so that they make sense, so they are followed with:

What just happened?

This heading explains the working of tasks or instructions that you have just completed.

You will also find some other learning aids in the book, including:

Have a go hero – heading

These set practical challenges and give you ideas for experimenting with what you have learned.

You will also find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Create a directory called BCT on your desktop."

A block of code is set as follows:

[remote "capsource"]
url = https://github.com/cappuccino/cappuccino
fetch = +refs/heads/*:refs/remotes/capsource/*

Any command-line input or output is written as follows:

git add .
git commit –m 'Unfinished list of marketing team'
git checkout master 

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Add button."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.