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

Committing the added files


Until now we have initiated the repository, added our files into the repository, and confirmed those changes by staging them (pushing them to the staged changes stage) but until they are committed the files are not said to be under version control. (This is because only when you commit does Git record the content of the files and save it as a new phase of that file/files, so that next time it can identify whether the files have any change of content by comparing the existing version to the last saved version).

This is a new addition to your Git lingo: This process is called committing.

So let's make an initial commit of your files. The first time you add a file to the repository and make a commit, Git registers the new file. Any further commits made to these files inside the same repository will be a commit for the changes based on the previous version of the same file available in the repository.

Though Git follows your orders it has a healthy habit of associating...