Simply Git
Simply Git
Version Control with Ease
About the Book
If you want to manage changes to your projects effectively with ease, this book is for you. It gives you the essential Git commands that cover most of your daily version control needs. Learning is more effective when you work on real examples. Therefore, this book also gives you a complete working solution that guides you through the workflow of managing your work with Git.
You will begin with the basics of managing a project on your local machine, which cover how to create a repository, save a revision of your work, move and delete files, compare differences, inspect project history, restore your project to a previous state, and undo your mistakes. Next, you will learn how to organize your work into isolated lines of development so that you can freely experiment with new ideas. Ideas that work can be merged while others can be discarded. You will also learn how to put a copy of your work online, either to serve as a backup or to share your work with others.
The last chapter gives you a few more commands that can make your work life easier. You will find guidelines on how to use Git effectively as well. Once you have finished this book, you should be able to use Git to manage your projects and explore advanced topics with relative ease.
Table of Contents
- Copyright
- Book summary
-
Introduction
- Why Git?
- Why this book?
- Outline
-
Getting started
- The command line
- Installing Git
- Configuring Git
- Summary
-
Basic version control with Git
- Setting up your project
- Initializing a Git repository
- Tracking files
- Preparing a revision of your work
- Committing your work
- What is a commit?
- Inspecting a commit
- Adding new changes
- What are the new changes?
- Inspecting the staged changes
- Preparing your next commit
- What are all the new changes you have made so far?
- What is HEAD?
- Your second commit
- Amending the last commit
- Renaming a file
- Writing a descriptive commit message
- Removing unwanted files
- Undoing the last commit
- Undoing an undo operation
- Retrieving an old revision of your work
- Returning to your latest work
- Accessing the ancestor of a commit
- Summary
-
Branching and merging
- What is a branch?
- Creating a new branch
- Branches are independent lines of development
- Adding a new document
- Adding and committing changes in one single step
- First complete version
- Fixing errors
- Switching branches in the middle of your work
- Stashing uncommitted changes
- Creating and switching to a new branch automatically
- Retrieving a list of stashed changes
- Restoring stashed changes
- Finalizing your work
- Merging
- Visualizing history graph
- Creating an alias for a long command
- Fast-forward merge
- Undoing a fast-forward merge
- Creating a merge commit
- Parents of a merge commit
- Conflicts
- Resolving conflicts
- Rebasing
- Undoing a rebase operation
- Rebasing without switching branches
- Cherry-picking
- Cleaning up a branch
- Cleaning up your repository for sharing
- Summary
-
Going online
- Creating a BitBucket account
- Creating a repository on BitBucket
- Connecting your local repository with a remote repository
- Pushing local changes to a remote repository
- Tracking information
- Your repository on BitBucket
- Cloning a remote repository
- Changing the author of a cloned repository
- Pushing from a cloned repository
- Fetching new changes from a remote repository
- Push rejection
- Resolving a push rejection
- Making the history linear
- Reverting your shared changes
- Renaming a remote repository
- Adding more remote repositories
- Creating a GitHub account
- Creating a private repository on GitHub
- Using GitHub
- Removing a remote repository
- Summary
-
Going the extra mile
- Navigating text
- Navigating history
- Ignoring files
- Tagging a commit
- Who last modified a file?
- Error hunting
- Bundling your repository
- Distributing your work
- Finding lost commits
- General guidelines
- Extra learning resources
- Summary
- About iThinker Studio
- Support
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them