
- 168 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
Git Essentials
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
Git Essentials
Table of Contents
Git Essentials
Credits
Foreword
Foreword
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Getting Started with Git
Installing Git
Running our first Git command
Setting up a new repository
Adding a file
Commit the added file
Modify a committed file
Summary
2. Git Fundamentals – Working Locally
Repository structure and file status life cycle
The working directory
File statuses
The staging area
Unstaging a file
The time metaphor
The past
The present
The future
Working with repositories
Unstaging a file
Viewing the history
Anatomy of a commit
The commit snapshot
The commit hash
Author, e-mail, and date
Commit messages
Committing a bunch of files
Ignoring some files and folders by default
Highlighting an important commit – Git tags
Taking another way – Git branching
Anatomy of branches
Looking at the current branches
Creating a new branch
Switching from branch to branch
Understanding what happens under the hood
A bird's eye view to branches
Typing is boring – Git aliases
Merging branches
Merge is not the end of the branch
Exercises
Exercise 2.1
What you will learn
Scenario
Results
Exercise 2.2
What you will learn
Scenario
Results
Deal with branches' modifications
Diffing branches
Using a visual diff tool
Resolving merge conflicts
Edit collisions
Resolving a removed file conflict
Keeping the edited file
Resolving conflicts by removing the file
Stashing
Summary
3. Git Fundamentals – Working Remotely
Working with remotes
Setting up a new GitHub account
Cloning a repository
Uploading modifications to remotes
What do I send to the remote when I push?
Pushing a new branch to the remote
The origin
Tracking branches
Downloading remote changes
Checking for modifications and downloading them
Applying downloaded changes
Going backward: publish a local repository to GitHub
Adding a remote to a local repository
Pushing a local branch to a remote repository
Social coding – collaborate using GitHub
Forking a repository
Submitting pull requests
Creating a pull request
Summary
4. Git Fundamentals – Niche Concepts, Configurations, and Commands
Dissecting the Git configuration
Configuration architecture
Configuration levels
System level
Global level
Repository level
Listing configurations
Editing configuration files manually
Setting up other environment configurations
Basic configurations
Typos autocorrection
Push default
Defining the default editor
Other configurations
Git aliases
Shortcuts to common commands
Creating commands
git unstage
git undo
git last
git difflast
Advanced aliases with external commands
Removing an alias
Aliasing the git command itself
Git references
Symbolic references
Ancestry references
The first parent
The second parent
World-wide techniques
Changing the last commit message
Tracing changes in a file
Cherry picking
Tricks
Bare repositories
Converting a regular repository to a bare one
Backup repositories
Archiving the repository
Bundling the repository
Summary
5. Obtaining the Most – Good Commits and Workflows
The art of committing
Building the right commit
Make only one change per commit
Split up features and tasks
Write commit messages before starting to code
Include the whole change in one commit
Describe the change, not what you have done
Don't be afraid to commit
Isolate meaningless commits
The perfect commit message
Writing a meaningful subject
Adding bulleted details lines, when needed
Tie other useful information
Special messages for releases
Conclusions
Adopting a workflow – a wise act
Centralized workflows
How they work
Feature branch workflow
GitFlow
The master branch
Hotfixes branches
The develop branch
The release branch
The feature branches
Conclusion
The GitHub flow
Anything in the master branch is deployable
Creating descriptive branches off of the master
Pushing to named branches constantly
Opening a pull request at any time
Merging only after a pull request review
Deploying immediately after review
Conclusions
Other workflows
The Linux kernel workflow
Summary
6. Migrating to Git
Before starting
Prerequisites
Working on a Subversion repository using Git
Creating a local Subversion repository
Checking out the Subversion repository with svn client
Cloning a Subversion repository from Git
Setting up a local Subversion server
Adding a tag and a branch
Commit...
Table of contents
- Git Essentials
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Git Essentials by Ferdinando Santacroce in PDF and/or ePUB format, as well as other popular books in Computer Science & Software Development. We have over one million books available in our catalogue for you to explore.