
Git for Programmers
Master Git for effective implementation of version control for your programming projects
- 264 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Git for Programmers
Master Git for effective implementation of version control for your programming projects
About this book
Learn to track, branch, merge, and manage code revisions for real-world development scenarios
Key Features
- Master Git and maintain your projects better through version control
- Get to grips with Git's typical workflows, advanced functions, and their implementations
- Learn the key Git commands to better manage your repository
Book Description
Whether you're looking for a book to deepen your understanding of Git or a refresher, this book is the ultimate guide to Git.
Git for Programmers comprehensively equips you with actionable insights on advanced Git concepts in an engaging and straightforward way. As you progress through the chapters, you'll gain expertise (and confidence) on Git with lots of practical use cases.
After a quick refresher on git history and installation, you'll dive straight into the creation and cloning of your repository. You'll explore Git places, branching, and GUIs to get familiar with the fundamentals. Then you'll learn how to handle merge conflicts, rebase, amend, interactive rebase, and use the log, as well as explore important Git commands for managing your repository.
The troubleshooting part of this Git book will include detailed instructions on how to bisect, blame, and several other problem handling techniques that will complete your newly acquired Git arsenal.
By the end of this book, you'll be using Git with confidence. Saving, sharing, managing files as well as undoing mistakes and basically rewriting history will be a breeze.
What you will learn
- Create remote and local repositories and learn how to clone them
- Understand the difference between local and remote repositories
- Use, manage, and merge branches back into the main branch
- Utilize tools to manage merge conflicts
- Manage commits on your local machine through interactive rebasing
- Use the log to gain control over all the data in your repository
- Use bisect, blame, and other tools to undo Git mistakes
Who this book is for
If you have basic understanding of Git and want to strengthen your command over advanced techniques and navigate different functions, this book is for you. Knowing the fundamentals of Git will help you get the most out of this book, but beginners willing to invest some extra effort will be able to follow along as well.
Frequently asked questions
- 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.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
4
Merging, Pull Requests, and Handling Merge Conflicts
- How to push a commit to the server
- How to manage your commits with the command line, Visual Studio, and GitHub Desktop
- How to merge into the main branch
- What a pull request is
- What merge conflicts are and how to resolve them
- What a fast-forward merge is
- What a true merge is
Merging overview
Book
C:\GitHub\VisualStudio\ProGitForProgrammers, that is the home of the Books application and that we've been editing in Visual Studio. Of course, we don't have to manage it in Visual Studio; we can use any of our tools. For example, I can open the terminal and change directories to the Books app:
What's in that push?
git show command:
Add properties). Next, Git does a diff (difference) between Book.cs and Book.cs naming the first one a and the second b. The one labeled a is Book.cs before this commit, the one labeled b is the new contents in this commit./dev/null. This indicates that a file is being compared against nothing, and thus everything is new./dev/null is being compared against file b (the new Book.cs file):
using statements, a namespace, and the class Book were all added in this commit. Before we push it, let's see what we can learn in Visual Studio.Visual Studio



Program.cs (rather than Book.cs), right-click on Program.cs and choose Git and then History. ...Table of contents
- Preface
- Introduction
- Creating Your Repository
- Branching, Places, and GUIs
- Merging, Pull Requests, and Handling Merge Conflicts
- Rebasing, Amend, and Cherry-Picking
- Interactive Rebasing
- Workflow, Notes, and Tags
- Aliases
- Using the Log
- Important Git Commands and Metadata
- Finding a Broken Commit: Bisect and Blame
- Fixing Mistakes
- Next Steps
- Other Books You May Enjoy
- Index