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 – configure Git in CLI mode


To configure Git using CLI you can use the following commands:

git config --global user.name "your full name"
git config --local user.name "your full name"
git config --global user.email "your email id"
git config --local user.email "your email id"
git config -l

What just happened?

By giving out our username and e-mail address both locally and globally we have provided ways for Git to identify and group the changes made to files present in any repository.

config is the operational keyword that needs to be used with git to set up the configuration of Git. To set a global value we add the --global parameter with the command, and to set a local value we add the --local parameter with the command.

As the name indicates, global configuration is nothing but a global value for all repositories created in the system by that system user, whereas local configuration is the exact opposite. As you would have guessed by now, the parameters user.name...