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

Time for action – Bob's changes


  1. Now Bob feels that he needs to change the content of the file. So he opens and changes the first line's text to "First line from source - Changed by Bob" so that the content of the file looks like the following lines:

    First line from source - Changed by Bob
    Second line
    Third line
    
  2. Then he adds the change and commits the same as shown in the following screenshot:

  3. In the interest of sharing the change with team members, he wants to push his changes to the common bare repository but as a rule of thumb, when working with multiple people on Git, pull before pushing so as to incorporate the changes first in case somebody has already pushed before you. Bob does a git pull first and then a git push as shown in the following screenshot:

What just happened?

Because of this push operation, the bare repository has progressed its level along with Bob's changes whereas the repository at our machine (collab_source) and Lisa's are still behind. Now the commit tree looks...