Fundamentals 8 min read

The First Commit in Go’s History and Its Evolution Through Version Control Systems

This article explores the origins of the Go programming language by examining its earliest code commits, the role of Brian Kernighan’s historic "hello world" snippet, the transition through multiple version‑control systems, and the eventual establishment of the official Go specification.

IT Services Circle
IT Services Circle
IT Services Circle
The First Commit in Go’s History and Its Evolution Through Version Control Systems

Hello, I am Jianyu.

Regarding the promotion of the Go language, most people know that its design started in 2007, it was released in 2009, and version 1.0 was launched in 2012.

Wikipedia shows the timeline as the image below:

But for Go itself, when was the first line of code actually committed?

Go's First Commit

In the GitHub repository golang/go you can find some clues in the commit history:

commit 7d7c6a97f815e9279d08cfaea7d5efb5e90695a8
Author: Brian Kernighan
Date:   Tue Jul 18 19:05:45 1972 -0500

    hello, world

    R=ken
    DELTA=7  (7 added, 0 deleted, 0 changed)

diff --git a/src/pkg/debug/macho/testdata/hello.b b/src/pkg/debug/macho/testdata/hello.b
new file mode 100644
index 0000000000..05c4140424
--- /dev/null
+++ b/src/pkg/debug/macho/testdata/hello.b
@@ -0,0 +1,7 @@
+main( ) {
+       extrn a, b, c;
+       putchar(a); putchar(b); putchar(c); putchar('!*n');
+} 
+a 'hell';
+b 'o, w';
+c 'orld';

From this record we see that the first commit dates back to July 18, 1972, made by the legendary Brian Kernighan. Who is he?

Who is Brian Kernighan

Brian Kernighan was a member of Bell Labs, participated in the early development of Unix and Plan 9, and is a highly respected figure in computer science.

Below is an image of him:

Brian Kernighan

Introduced the first "hello world" program in "A Tutorial Introduction to the Language B" as a language‑learning example.

Co‑developer of AMPL and AWK, and designed famous heuristic algorithms for two NP‑incomplete optimization problems with Shen Lin.

Co‑author of more than ten books, including "The C Programming Language" and "The Go Programming Language".

It seems Brian has many connections to Go, Plan 9, and other foundational projects, though this is not widely known.

Why does his name appear in the first commit?

Why Does It Appear

Because this question has been asked many times, Russ Cox wrote an article titled Go’s Version Control History to整理 the Go commit history.

In fact, the commit shown above is a “fake commit” for Go; the real first Go commit is:

commit 18c5b488a3b2e218c0e0cf2a7d4820d9da93a554
Author:      Robert Griesemer
AuthorDate: Sun Mar 2 20:47:34 2008 -0800
Commit:      Robert Griesemer
CommitDate: Sun Mar 2 20:47:34 2008 -0800

    Go spec starting point.

    SVN=111041

 doc/go_spec | 1197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1197 insertions(+)

This commit introduced the Go Annotated Specification, which contains recent design decisions, guiding principles, and many language details that essentially defined the current shape of Go.

The earlier Brian Kernighan "hello world" commit was actually introduced by Russ Cox around October 2009 when preparing Go for open‑source release and migrating the repository from SVN to Perforce and then to Mercurial.

In other words, this commit was manually inserted, copied from Brian Kernighan’s "A Tutorial Introduction to the Language B":

main ( ) {
 extrn a, b, c;
 putchar(a); putchar(b); putchar(c); putchar('!*n');
}

a 'hell';
b 'o, w';
c 'orld';

Besides the 1972 commit, code from 1974, 1988 and other years were also introduced.

This was done as a programmer’s tribute—a kind of romantic gesture.

Summary

Over the decades, Go’s source control has moved from SVN to Perforce, then to Google Code Mercurial, and finally to Gerrit Code Review, reflecting multiple transitions that led to the current setup.

Experienced Go developers know that Gerrit still has many areas for improvement, and we can expect a sixth migration in the future.

The so‑called “fake commits” were mainly added to honor the pioneers, embodying a programmer’s romance.

References

[1]

golang/go: https://github.com/golang/go

[2]

Go’s Version Control History: https://research.swtch.com/govcs

software engineeringGogitversion controlprogramming historyBrian Kernighan
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.