Page 8 - MSDN Magazine, June 2017
P. 8
Editor’s NotE MICHAEL DESMOND Grokking Git
Back in the August 2016 issue, MSDN Magazine published a fea- ture by Jonathan Waldman titled “Commit to Git: Source Control in Visual Studio 2015” (msdn.com/magazine/mt767697). That article wentontobeamongthe10-most-visitedfeaturearticlesforallof 2016, based on first-month page views, and was the most-trafficked DevOps-themed article we’ve ever published.
Clearly, Git struck a nerve with readers. So when Waldman pitched atwo-partexplorationofGitinternalsforVisualStudiodevelopers, it didn’t take me long to say yes. Working closely with Microsoft experts Kraig Brockschmidt and Ralph Squillace, Waldman’s first part of the series, “Git Internals for Visual Studio Developers,” explores the version control system (VCS) and how it differs from the traditional, centralized VCSes familiar to most Windows developers.
Along the way, Waldman realized that developers who understand the directed acyclic graph (DAG) used to store commit objects in Git are in much better position to grasp advanced Git operations and concepts.
Waldman began using Git as his VCS with Visual Studio 2013 and, he says, “grew to love working against a decentralized repo.” But he faced a learning curve as he experimented with Git and pieced together guidance and resources. When Microsoft released enhanced Git support with Visual Studio 2015, Waldman dove right
in, eventually writing his Commit to Git feature article in MSDN Magazine based on his experience.
“There’s been a dearth of good material about Git for the Microsofttechnologyprofessional,”hesays,notingthatmostGit tutorials and instruction rely on the Unix shell command-line interface. “I think MSDN Magazine readers enjoyed finally seeing material about Git that leverages the Windows-based Visual Studio IDEandPowerShell/CommandPromptcommand-lineinterfaces.”
Along the way, Waldman realized that developers who understand the directed acyclic graph (DAG) used to store commit objects in Git are in much better position to grasp advanced Git operations and concepts. He learned also that developers often misunder- stand what a Git branch is and how it works. In fact, a large part of the challenge in grokking Git boils down to vocabulary, where familiar terms like check in/check out, branch and merge represent approaches different from those in a centralized VCS.
“I think it’s essential to first understand the repo from Git’s perspective, using a purely repo-centric vocabulary. Once you do that, you realize that Git simply stores and manages commit objects on a [DAG], and that’s all,” Waldman says. “Everything else has to do with user-initiated actions that compare or manage those objects. And when it comes to describing those actions, it is crit- ical for team members to adopt a lean Git vocabulary with clear definitions and then use it formally and consistently.”
Waldman’s two-part exploration this month and next aim to break down these barriers. This month’s article introduces the Git DAG and explores commit objects and branching. Next month, Waldman plans to extend his coverage to what he describes as “foundational knowledge” about Git.
“I plan to explore exactly what happens when you check in and check out code—with particular emphasis on Git’s three-tree archi- tecture,” Waldman says. “I’ll also cover how Git detects code changes, and provide additional details
about branching and merging.”
Visit us at msdn.microsoft.com/magazine. Questions, comments or suggestions for MSDN Magazine? Send them to the editor: mmeditor@microsoft.com.
© 2017 Microsoft Corporation. All rights reserved.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, you are not permitted to reproduce, store, or introduce into a retrieval system MSDN Magazine or any part of MSDN Magazine. If you have purchased or have otherwise properly acquired a copy of MSDN Magazine in paper format, you are permitted to physically transfer this paper copy in unmodified form. Otherwise, you are not permitted to transmit copies of MSDN Magazine (or any part of MSDN Magazine) in any form or by any means without the express written permission of Microsoft Corporation.
A listing of Microsoft Corporation trademarks can be found at microsoft.com/library/toolbar/3.0/trademarks/en-us.mspx. Other trademarks or trade names mentioned herein are the property of their respective owners.
MSDN Magazine is published by 1105 Media, Inc. 1105 Media, Inc. is an independent company not affiliated with Microsoft Corporation. Microsoft Corporation is solely responsible for the editorial contents of this magazine. The recommendations and technical guidelines in MSDN Magazine are based on specific environments and configurations. These recommendations or guidelines may not apply to dissimilar configurations. Microsoft Corporation does not make any representation or warranty, express or implied, with respect to any code or other information herein and disclaims any liability whatsoever for any use of such code or other information. MSDN Magazine, MSDN and Microsoft logos are used by 1105 Media, Inc. under license from owner.
4 msdn magazine