Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Git Best Practices Guide
  • Table Of Contents Toc
Git Best Practices Guide

Git Best Practices Guide

By : PIDOUX Eric
1 (1)
close
close
Git Best Practices Guide

Git Best Practices Guide

1 (1)
By: PIDOUX Eric

Overview of this book

If you are a developer and you want to completely master Git without heavy theory, this is the book for you. A reasonable knowledge level and basic understanding of Git concepts will get you started with this book.
Table of Contents (7 chapters)
close
close

Stashing your changes

Git has a command that allows you to save the current state of the local working repository and go back to the last committed revision with git stash.

This is really helpful when you have to develop an urgent fix. After this, you can restore the stashed changes and continue with your development.

To use this command, just execute the following command snippet:

Erik@server:~$ git stash
#Do your fix and then unstash edit
Erik@server:~$ git stash pop

Of course, you can do more with this command, such as save a list of stashes:

Erik@server:~$ git stash
#See the list of available stashes
Erik@server:~$ git stash list
#Apply the second stash
Erik@server:~$ git stash apply stash@"1}
#Delete a stash
Erik@server:~$ git stash drop stash@"1}
#Or delete all stashes
Erik@server:~$ git stash clear

Let's suppose that your stash concerns a feature and you haven't created a dedicated branch for it. You can simply create a branch executing this command:

Erik@server:~...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Git Best Practices Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon