July 2018
Intermediate to advanced
354 pages
10h 57m
English
In this example, we'll use the Git-Version-Control-Cookbook-Second-Edition_tips_and_tricks repository. We'll use the master branch, but before we are ready to try the stash command, we need to create some changes in the working directory and the staging area, as follows:
$ git clone https://github.com/PacktPublishing/Git-Version-Control-Cookbook-Second-Edition_tips_and_tricks.git $ cd Git-Version-Control-Cookbook-Second-Edition_tips_and_tricks$ git checkout master
Make some changes to foo and add them to the staging area, as follows:
$ echo "Just another unfinished line" >> foo $ git add foo
Make some changes to bar and create a new file:
$ echo "Another line" >> bar $ echo "Some content" > new_file $ git status On branch master ...
Read now
Unlock full access