Book Image

Git: Mastering Version Control

By : Aske Olsson, Jakub Narębski, Ferdinando Santacroce, Rasmus Voss
Book Image

Git: Mastering Version Control

By: Aske Olsson, Jakub Narębski, Ferdinando Santacroce, Rasmus Voss

Overview of this book

Git is one of the most popular types of Distributed Version Control System. Since its inception, it has attracted skilled developers due to its robust, powerful, and reliable features. Like most powerful tools, Git can be hard to approach for the newcomers. However, this learning path will help you overcome this fear and become adept at all the basic and advanced tasks in Git. This course starts with an introduction to version control systems before you delve deeply into the essentials of Git. This serves as a primer for the topics to follow such as branching and merging, creating and managing a GitHub personal repository, and fork and pull requests. You'll also learn how to migrate from SVN using Git tools or TortoiseGit and migrate from other VCSs, concluding with a collection of resources, links, and appendices. As you progress on to the next module, you will learn how you can automate the usual Git processes by utilizing the hook system built into Git. It also covers advanced repository management, including different options to rewrite the history of a Git repository before you discover how you can work offline with Git, how to track what is going on behind the scenes, and how to use the stash for different purposes. Moving forward, you will gain deeper insights into Git's architecture, its underlying concepts, behavior, and best practices. It gives a quick implementation example of using Git for a collaborative development of a sample project to establish the foundation knowledge of Git operational tasks and concepts. By exploring advanced Git practices, you will attain a deeper understanding of Git’s behavior, allowing you to customize and extend existing recipes and write your own. This Learning Path is a blend of content, all packaged up keeping your journey in mind. It includes content from the following Packt products: • Git Essentials, Ferdinando Santacroce • Git Version Control Cookbook, Aske Olsson and Rasmus Voss • Mastering Git, Jakub Nar?bski
Table of Contents (36 chapters)
Git: Mastering Version Control
Credits
Preface
3
Git Fundamentals – Working Remotely
Bibliography
Index

Installing Git


Git is open source software. If you are running a Windows machine, you can download it for free from http://git-scm.com. At the time of writing this book, the current version of Git is 1.9.5. If you are a Mac user, you can download it from http://git-scm.com/downloads; here, you can find the *.dmg file, too. Finally, if you are a Linux user, you probably have Git out of the box (if not, use the apt-get install git command or equivalent). Here, I won't go into too much detail about the installation process itself; I will only provide a few recommendations for Windows users shown in the following screenshot:

Enabling Windows Explorer integration is generally useful; you will benefit from a convenient way to open a Git prompt in any folder by right-clicking on the contextual menu.

Let Git be used in classic DOS command prompt, too, as shown in the following screenshot:

Git is provided with an embedded Windows-compatible version of the famous Bash shell from Linux, which we will use extensively. By doing this, we will also make Git available to third-party applications, such as GUIs and so on. It will come in handy when we give some GUI tools a try.

Use defaults for line endings. This will protect you from future annoyances.

At the end of the process, we will have Git installed, and all its *nix friends will be ready to use it.