What will you learn from this book?
Many people who use Git rely on “recipes”–basic copy-paste commands–without understanding how this version control system actually works. But what do you do if you find yourself in a tight spot? You can’t simply wing it. With this unique hands-on guide, you’ll learn valuable ways to use Git in many different situations. Raju Gandhi peels back the layers to reveal the simple yet powerful engine that powers Git, with activities that help you truly understand this crucial tool as you get it up and running. You’ll master branches, tags, stashes, and merges; learn best practices; collaborate with your team; and unlock the full potential of Git.
What’s so special about this book?
If you’ve read a Head First book, you know what to expect–a visually rich format designed for the way your brain works. If you haven’t, you’re in for a treat. With this book, you’ll learn Git through a multisensory experience that engages your mind rather than a text-heavy approach that puts you to sleep.
1. Beginning Git: Get going with Git Why we need version control Cubicle Conversation Start your engines ... A quick tour of the command line More on the command line (mkdir) More on the command line (ls) More on the command line (cd) No argument there Cleaning up Creating your first repository Inside the init command Magnetic Thoughts Introduce yourself to Git How you will use Git Putting Git to Work Meanwhile, back at the HawtDog Dating Service ... Speaking of ... Congratulations on your first commit! What exactly does it mean to commit? What exactly does it mean to commit? (continued) Look before you leap The three stages of Git Great question! Git in the command-line A peek behind the curtain The multiple states of files in a Git repository A typical day in the life of a new file The object database is the “source of truth”. The index is a “scratchpad” Computer, status report! Whoa, easy tiger! You’ve made history! Magnetic Thoughts 2. Branching Out: Multiple trains of thought It all started with an email But things didn’t quite pan out... What would you do if you were Zelda? Updating the restaurant menu First things first Very astute! Choices ... so many choices! Switching tracks Magnetic Thoughts Back at the ‘80s Diner Send it back! Visualizing branches Branches, commits, and the files contained within Cubicle Conversation Working in parallel What is a branch, really? Switching branches, or switching directories? Some branches are more equal than others Bring it in! RTM (git branch edition) Making the fall menu official Some merges are fast-forward It doesn’t quite work the other way A little more Git setup It’s almost Thursday! Wait! You moved? It’s almost Thursday! (continued) It’s a merge commit Merge commits are kinda special Things don’t always go so smoothly I am so conflicted! I am so conflicted! (continued) I am so conflicted! (Ooof! Almost there) A typical workflow Magnetic Thoughts Solution 3. Looking Around: Investigating your Git repository In pursuit of the ultimate cilantro sauce recipe Commits aren’t enough Mirror, mirror on the wall How does git log work? Making git log do all the work What diff-erence does it make? A life of pluses and minuses A life of pluses and minuses (continued) Making your diffs easier on the eyes Diff-ing staged changes How’s the view from over there? Be careful when you compare branches! All together now! 4. Undoing: Fixing Your Mistakes Planning an engagement party An error in judgement Cubicle conversation Undoing changes to the working directory Undoing changes to the index Deleting files from Git repositories Committing to delete Editing commit messages Renaming branches Making alternative plans The role of HEAD Referencing commits using HEAD Traversing merge commits Unneeded commits Removing commits The three types of reset git reset --soft git reset (or git reset --mixed) git reset --hard Another way to undo commits Reverting commits Annnnnd that’s a wrap!
How to download source code?
1. Go to:
2. Search the book title:
Head First Git: A Learner’s Guide to Understanding Git from the Inside Out, sometime you may not get the results, please search the main title
3. Click the book title in the search results
Publisher resources section, click
Download Example Code.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.