liveBook · Manning

Git

As explained in 100 SQL Server Mistakes and How to Avoid Them

Git is an open-source distributed version control system for tracking changes to files and coordinating software development.

Git is an open-source distributed version control system that keeps code in a known, reliable location, preserves history, and supports parallel development. Relying only on a development server and its backups can leave code unrecoverable, as MagicChoc discovered. section 7.6.1

A practical Git setup for a SQL Server Database project includes:

  • Create a repository from Visual Studio’s Git Changes window, choosing its local path, license template, and gitignore template. section 7.6.1
  • Connect the repository to GitHub, specifying the account, repository name, owner, and optional description. section 7.6.1
  • Create a code branch, review changes there, and merge acceptable work into the main or master branch. section 7.6.1
  • Expect occasional conflicts because files remain unlocked, then use version history to roll back introduced bugs. section 7.6.1
Figure 7.7 Creating and configuring a repo in GitHub

Repository creation in GitHub, including initialization settings and account configuration. section 7.6.1

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Explains repository creation, GitHub configuration, branching, conflicts, and rollback without detailing command-line operations.
Examples
Uses the unrecoverable MagicChoc code scenario and a Visual Studio workflow for creating, configuring, branching, and committing a repository.
What it assumes
Assumes familiarity with Visual Studio and SQL Server Database projects while introducing repository, branch, trunk, and gitignore usage.
What you can do after
Operate/configure Git repositories, create branches, manage conflicts, preserve history, and roll back faulty code.
How it connects
Connects source control with GitHub, branching, version history, rollback, Visual Studio, and SQL Server Database projects.

Also explained in

Compare how 8 books explain git →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.