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

Why you need a version control system


Try answering the following questions with regards to your present system setup:

  • Can you maintain multiple versions of the same file under the same name, thus avoiding cluttering of files with small differences in their names mentioning their versions?

  • Do you have any means of marking a specific portion of your content in the file/files that you might need in future before changing them for present needs?

  • Are you satisfied with the existing scenario where your only failsafe plan for getting back your content is copying and pasting the file or group of files in a separate folder that contains the word "backup" in its name? And updating it regularly?

If your answer to any of these questions is a big no, then that's exactly the reason you would probably need a version control system and this book.

If your answers to these questions are yes, it means that you have probably managed to find roundabout ways to solve these issues. Simple measures could include creating a restoration point in latest releases of Windows, which internally stores versions of all documents such as your Word, Excel, or PowerPoint files present at that point in time as a part of creating your restoration point.

As varied as the potential solutions may be, allow me tell you that version control systems will amaze you with their power, simplicity, and ease of use. They will allow you to achieve much better results with less than half the time and effort that you would normally put into your present solutions.

By using a version control system you have the power to play with the flow of changes happening to your documents. Whenever you have to make considerable amount of changes to the existing content you can mark those changes as a stage (with a tag) that you can revisit later; this serves as a failsafe mechanism just in case things didn't go as per your plan and you want to revert the content of the document back to a particular older state.

The following figures demonstrate the flow of content creation with and without a version control system:

The previous figure shows you the flow of a content creation matrix at different times spread across sessions. As you can observe in a regular constructive context the flow is from left to right, meaning you progress with content creation one way when it comes to building content on different time periods. In this flow you cannot go back to a previous phase from where you can take a different direction altogether when compared to what you have already taken.

To explain it using our flow diagram, you cannot go back to any of the intermediate stages from the final stage to write an entirely different third paragraph to serve a new purpose without any data loss. (You cannot use the undo feature as the content was built across time periods, and you cannot undo something once you have saved and closed your file.)

Presently we achieve this using the "save as" option, giving the file a different name, deleting the third paragraph, and starting to write a new one.

In contrast, when you use a version control system, it's a multi-directional free flow context. You mark each and every change you consider important as a new stage and proceed with your content creation. This allows you to get back to any earlier stages that you have created, without any data loss.

And the best part is you are not limited by the following:

  • Number of hops

  • Number of stages between the hops

  • Direction of the hop

This means we can, without any concern, jump to and fro between and across stages in any direction without any data loss. Now doesn't that sound like the need of the hour?