Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Git Version Control Cookbook

You're reading from   Git Version Control Cookbook 90 hands-on recipes that will increase your productivity when using Git as a version control system

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781782168454
Length 340 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Navigating Git 2. Configuration FREE CHAPTER 3. Branching, Merging, and Options 4. Rebase Regularly and Interactively, and Other Use Cases 5. Storing Additional Information in Your Repository 6. Extracting Data from the Repository 7. Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts 8. Recovering from Mistakes 9. Repository Maintenance 10. Patching and Offline Sharing 11. Git Plumbing and Attributes 12. Tips and Tricks Index

Turning off automatic garbage collection


The automatic triggering of garbage collection can be turned off so it will not run unless manually triggered. This can be useful if you are searching the repository for a lost commit/file and want to make sure that it is not being garbage collected while searching (running Git commands).

Getting ready

We'll use the hello_world_flow_model repository again for this example:

$ git clone https://github.com/dvaske/hello_world_flow_model.git
Cloning into 'hello_world_flow_model'...
remote: Reusing existing pack: 51, done.
remote: Total 51 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (51/51), done.
Checking connectivity... done.
$ cd hello_world_flow_model
$ git checkout develop
Already on 'develop'
Your branch is up-to-date with 'origin/develop'.
$ git reset --hard origin/develop
HEAD is now at 2269dcf Merge branch 'release/1.0' into develop

How to do it...

  1. To switch off the automatic garbage collection triggering, we need to set the gc.auto configuration...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime