Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Git Essentials - Second Edition

You're reading from  Git Essentials - Second Edition

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781787120723
Pages 238 pages
Edition 2nd Edition
Languages
Author (1):
Ferdinando Santacroce Ferdinando Santacroce
Profile icon Ferdinando Santacroce

Useful techniques

In this section, we will improve our skills, learning some techniques that will come in handy in different situations.

Git stash - putting changes temporally aside

It sometimes happens that you need to switch branches for a moment, but some changes are in progress in the current branch. To put aside those changes for a while, we can use the git stash command: let's give it a try in our grocery repository.

Append a new fruit to the shopping list, then try to switch branch; Git won't allow you to do so, because with the checkout you would lose your local (not yet committed) changes to the shoppingList.txt file. So, type the git stash command; your changes will be set apart and removed from your...

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 €14.99/month. Cancel anytime}