Git Version Control Cookbook
eBook - ePub

Git Version Control Cookbook

Aske Olsson, Rasmus Voss

  1. 340 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Git Version Control Cookbook

Aske Olsson, Rasmus Voss

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Starting with the Git data model, you will learn how Git stores files and how it looks at commits. You will then learn how you can recover from mistakes; from committing on the wrong branch to recovering lost commits/files. Next, you will discover how you can force rebase on some branches and use regular Git merge on other branches. You will also learn how to extract information from the repository.

As you progress through this book, you will learn how you can automate the usual Git processes by utilizing the hook system built into Git. The book also covers advanced repository management, including different options to rewrite the history of a Git repository. Finally, you will 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.

Approach

This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system.

Who this book is for

If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and follow the recipes included in this book, basic knowledge of Git command-line code is mandatory.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Git Version Control Cookbook an online PDF/ePUB?
Yes, you can access Git Version Control Cookbook by Aske Olsson, Rasmus Voss in PDF and/or ePUB format, as well as other popular books in Computer Science & Content Management Systems. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781782168454
Edition
1

Git Version Control Cookbook


Table of Contents

Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Navigating Git
Introduction
Git's objects
Getting ready
How to do it...
The commit object
The tree object
The blob object
The branch
The tag object
How it works...
There's more...
See also
The three stages
Getting ready
How to do itā€¦
How it worksā€¦
See also
Viewing the DAG
Getting ready
How to do it...
How it works...
See also
Extracting fixed issues
Getting ready
How to do it...
How it works...
There's more...
Getting a list of the changed files
Getting ready
How to do it...
How it works...
There's more...
See also
Viewing history with Gitk
Getting ready
How to do it...
How it works...
There's more...
Finding commits in history
Getting ready
How to do it...
How it works...
There's more...
Searching through history code
Getting ready
How to do it...
How it works...
There's more...
2. Configuration
Configuration targets
Getting ready
How to do it...
How it works...
There's more...
Querying the existing configuration
Getting ready
How to do it...
How it works...
There's more...
Templates
Getting ready
How to do it...
How it works...
A .git directory template
Getting ready
How to do it...
How it works...
See also
A few configuration examples
Getting ready
How to do it...
Rebase and merge setup
Expiry of objects
Autocorrect
How it works...
There's more...
Git aliases
Getting ready
How to do it...
How it works...
There's more...
The refspec exemplified
Getting ready
How to do it...
How it works...
3. Branching, Merging, and Options
Introduction
Managing your local branches
Getting ready
How to do itā€¦
How it worksā€¦
There's more...
Branches with remotes
Getting ready
How to do itā€¦
There's more...
Forcing a merge commit
Getting ready
How to do it...
There's moreā€¦
Using git rerere to merge known conflicts
How to do itā€¦
There's more...
The difference between branches
Getting ready
How to do itā€¦
There's moreā€¦
4. Rebase Regularly and Interactively, and Other Use Cases
Introduction
Rebasing commits to another branch
Getting ready
How to do itā€¦
How it works
Continuing a rebase with merge conflicts
How to do it
How it works
There's moreā€¦
Rebasing selective commits interactively
Getting ready
How to do it
There's moreā€¦
Squashing commits using an interactive rebase
Getting ready
How to do it...
There's moreā€¦
Changing the author of commits using a rebase
Getting ready
How to do it...
How it works...
Auto-squashing commits
Getting ready
How to do it...
There's moreā€¦
5. Storing Additional Information in Your Repository
Introduction
Adding your first Git note
Getting ready
How to do itā€¦
There's more...
Separating notes by category
Getting ready
How to do it...
How it works...
Retrieving notes from the remote repository
Getting ready
How to do it...
How it works...
Pushing notes to a remote repository
How to do it...
There's more...
Tagging commits in the repository
Getting ready
How to do it...
There's more...
6. Extracting Data from the Repository
Introduction
Extracting the top contributor
Getting ready
How to do it...
There's more...
Finding bottlenecks in the source tree
Getting ready
How to do it...
There's more...
Grepping the commit messages
Getting ready
How to do it...
The contents of the releases
How to do it...
How it works...
7. Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
Introduction
Using a branch description in the commit message
Getting ready
How to do it...
Creating a dynamic commit message template
Getting ready
How to do it...
There's more...
Using external information in the commit message
Getting ready
How to do it...
Preventing the push of specific commits
Getting ready
How to do it...
There's more...
Configuring and using Git aliases
How to do it...
How it works...
Configuring and using Git scripts
How to do it...
Setting up and using a commit ...

Table of contents

  1. Git Version Control Cookbook
Citation styles for Git Version Control Cookbook

APA 6 Citation

Olsson, A., & Voss, R. (2014). Git Version Control Cookbook (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/390872/git-version-control-cookbook-pdf (Original work published 2014)

Chicago Citation

Olsson, Aske, and Rasmus Voss. (2014) 2014. Git Version Control Cookbook. 1st ed. Packt Publishing. https://www.perlego.com/book/390872/git-version-control-cookbook-pdf.

Harvard Citation

Olsson, A. and Voss, R. (2014) Git Version Control Cookbook. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/390872/git-version-control-cookbook-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Olsson, Aske, and Rasmus Voss. Git Version Control Cookbook. 1st ed. Packt Publishing, 2014. Web. 14 Oct. 2022.