You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/pages/02-development-environments/21-git.markdown
+37-11Lines changed: 37 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,42 @@ frequently used as the version control system for Python projects.
17
17
18
18
<divclass="well see-also">Git is an implementation of the <ahref="/source-control.html">source control</a> concept. Learn how these pieces fit together in the <ahref="/development-environments.html">development environments</a> chapter or view the <ahref="/table-of-contents.html">table of contents</a> for all topics.</div>
19
19
20
-
## Why Git
21
-
Git has grown traction in the industry because of the way it has transformed the way that developers and organizations develop software projects on a day-to-day basis.
22
20
23
-
In traditional VCS where workflows were centralized, developers would have to pull a working copy from the central repository. This would typically be done over the network, which meant that the network would become the bottleneck the larger the organization grew. In Git, this is not the case since a developer would get a local copy of the full repository. As a result, developers would need minimal network connection in order to retrieve updates and commit history since everything is in their local copy.
21
+
## Why is Git widely-used by developers?
22
+
Git is a *distributed* version control system (DVCS) compared to the
23
+
centralized models previously provided by
24
+
[Subversion](/apache-subversion.html) and [CVS](https://www.nongnu.org/cvs/).
25
+
Files would need to be "checked out" over the network by a single person at
26
+
a time while she was woring. The network transfer speed as well as the
27
+
blocking check out model became a significant bottleneck, especially for
28
+
large development teams.
29
+
30
+
Git clones a full repository and its entire history instead of just the
31
+
current state of a file. Developers only require a network connection when
32
+
pulling updates and pushing changes to a backup repository. The commit log
33
+
and file histories are stored and transmitted far more efficiently than
34
+
prior version control systems to maximize the effectiveness of the
35
+
distributed version control design.
36
+
37
+
Another issue with traditional VCS was that it was difficult to create
38
+
branches. Take a look
39
+
[at this tutorial on managing a CVS repository](http://www.sci.utah.edu/~macleod/docs/cvs-tips.html)
40
+
as an example of the confusion the existing non-distributed models could
41
+
cause. Git simplified the branching process with simplified commands
42
+
such as `git checkout -b` and faster branch merging and clean up. In contrast
43
+
to earlier version control systems, Git encourages developers to create local
44
+
branches and experiment in them without impacting a stable `master` branch.
45
+
46
+
[GitHub](https://www.github.com/) also helped to drive Git as the overwhelming
47
+
version control favorite by providing the open source community with free open
48
+
remote Git repositories. GitHub's web application user interface, issue
49
+
tracking and pull request features for maintainers and consumers also
50
+
encouraged more collaboration than Git alone. Recently,
51
+
[GitHub's third-party marketplace](https://github.com/marketplace) has
52
+
begun to add more features by integrating
53
+
[continuous integration](/continuous-integration.html) servers like
54
+
as [Jenkins](/jenkins.html) and [code metrics](/code-metrics.html) services.
24
55
25
-
Another thing about traditional VCS was that it was difficult to create a branch ([see here for an example](http://www.sci.utah.edu/~macleod/docs/cvs-tips.html)). To simplify the process, folks created their own scripts to simplify the experience. But in Git, none of that is needed. Creating new branches is a single command (`git checkout -b`). This ease of use is important because it encouraged a distributed development workflow. In other words, developers could create local branches with ease and experiment with multiple concepts without impacting a mainline branch or a stable branch.
26
-
27
-
One point that cannot be forgotten is the rise of GitHub as a public place where anyone could create their own Git repositories in the name of open-source. Its user experience and ease of use is what led to its popularity. Two features that helped pave the way for meaningful interaction between maintainers and consumers were the issues page and pull request page where GitHub users could voice their concerns or contribute back to the community. As organizations started finding value in GitHub, they added third-party integrations (i.e. Jenkins/Travis/CircleCI) to the platform.
28
56
29
57
## Beginner Git tutorials
30
58
Git can take awhile to wrap your head around, even for experienced software
@@ -187,8 +215,6 @@ minimize merge conflicts.
187
215
is a helpful post with diagrams to show how teams can create a Git workflow
0 commit comments