Professional Documents
Culture Documents
Beginning Git and Github Version Control Project Management and Teamwork For The New Developer 2 Converted Edition Mariot Tsitoara Full Chapter
Beginning Git and Github Version Control Project Management and Teamwork For The New Developer 2 Converted Edition Mariot Tsitoara Full Chapter
What Is Git?
Remember the proprietary distributed version control
system BitKeeper SCM from the last section? Well, the
Linux kernel developers used it for their development. The
decision to use it was wildly regarded as a bad move and
made many people unhappy. In 2005, BitKeeper SCM
ceased to be free, leading to the need for a new VCS for the
Linux kernel development. Since no suitable alternative
was available, the decision was made to develop a new VCS
from scratch, creating Git.
Git shares similarities with BitKeeper SCM, a distributed
VCS, but it offers several improvements. It is known for its
speed and efficiency, particularly when handling large
projects. The Git community is highly active, with
numerous contributors involved in its development and
maintenance. To learn more about Git, visit the official
website at https://git-scm.com.
The features and workings of Git will be explained in
more detail later in this section.
$ git clone
https://github.com/mariot/thebestwebsite.git
Figure 1-8 The result of the git clone command
$ git log
Figure 1-10 A typical Git history log
Now that the new branch is created, you can modify the
files. You can use whatever editor you want; Git tracks all
the changes via checksums. Now that you have made the
necessary changes, it is time to put them in the staging
area. As a reminder, you put modified codes ready to be
snapshotted in the staging area. If you modified the
README.md file, you could add it to the staging area using
the add command.
And that’s it! The changes you made are now in the
database and safely stored. But only on your computer! The
others can’t see your work because you worked on your
own repository and a different branch. You must push your
commits to the remote server to show your work to others.
But you must show the code to the senior dev before
making a push. If they are okay with it, you can merge your
branch with the main snapshot of the project (called the
main branch). So first, you must navigate back to the main
branch using the checkout command.
You are now on the main branch, where all the team’s
work is stored. But by the time you worked on your fix, the
project may have changed, meaning that a team member
may have changed some files. You should retrieve those
changes before committing your own changes to the main.
This limits the risk of conflicts, which can happen when
two or more contributors change the same file. You must
pull the project from the remote server (also called origin)
to get the changes.
Now that the commit has been merged into the main, it
is time to push the changes to the main server. You do that
by using the push command.
$ git push
Summary
This chapter offered a sneak peek at Git, which has many
more powerful features to learn about. Before moving to
the next step, ask yourself: How will Git help me in my
projects? Which features are the most important? Will Git
improve my workflow?
The main takeaway from this chapter is the difference
between distributed and centralized VCSs. Team workflows
using CVCS is less organized and leaves too many
developers unfulfilled. Therefore, you must learn more
about distributed VCS to keep up with the times.
You’ve seen the typical workflow of a team using Git in
this chapter. It’s the workflow most teams use in
professional environments and the open source community.
This workflow will increase your productivity even if you
plan to work alone.
Don’t worry about understanding all of Git right now;
focus on what it can do for you. You will become familiar
with it after a couple of chapters. Next, let’s focus on
installing Git on your system.
© The Author(s), under exclusive license to APress Media, LLC, part of
Springer Nature 2024
M. Tsitoara, Beginning Git and GitHub
https://doi.org/10.1007/979-8-8688-0215-7_2
Now that you know what version control is and how Git
works, you are ready to learn how to install and set it up,
which is quite easy.
Installation
The files required to install Git are available at
https://git-scm.com/downloads for all systems. Follow
the link and choose your operating system.
Figure 2-1 shows that GUI clients are available for Git.
However, I recommend not venturing into that area until
you complete Part III of this book. It is important to
familiarize yourself with Git commands before using GUI
clients; otherwise, you may waste a lot of time trying to
resolve a simple issue that could be easily resolved using
basic Git commands in seconds.
Figure 2-1 The download section of git-scm.com as of June 2023
Windows
Installing Git on Windows systems is a straightforward
process. After opening the link (https://git-
scm.com/download/win), the download should start
automatically, and you are directed to the confirmation
page, as shown in Figure 2-2. If the download doesn’t start
automatically, you can manually download the build
corresponding to your Windows version.
Bach and Handel rescued the Germans from the reputation of being
musical barbarians, for Germany had not had a Lully or a Palestrina!
But just in time, Bach and Handel entered and Bach carried
composition to maturity and religious musical art to its highest
point, while Handel was one of the foremost opera and oratorio
composers of his day.
And indeed not until Mozart’s day did the Italians think that
Germany was anything but barbarous, not in fact until they were
outranked in Italian Opera by a German.
Of all the unassuming men of genius Johann Sebastian Bach
(1685–1750) is the most lovable. Never did he seem to realize that he
was doing anything, but the will of God, never did he seem to care
what people thought of his work, but went on composing, supporting
twenty children, often with so little money that he tutored and played
at funerals to eke out a living. In his life there was little glitter. Bach
was a saint, if there was ever a saint. Although some few admired
Bach during his lifetime, it was not until one hundred years after his
death that his works were known and that he received the fame he
deserved.
The Bach family for six generations were musicians, beginning
with his grandfather “to the 5th power,” Veit Bach, a Thuringian
baker in the 16th century whose pleasure “was to use a small zither,
which he took with him to play, while the mill was moving.” All his
descendants became musicians down to and beyond Johann
Sebastian.
The Bachs were great family lovers and every year they held
reunions, at which all of the different members living in various parts
of Germany, met together and enjoyed a jolly time singing and
playing.
Sebastian was born in 1685 in Eisenach, the town where Martin
Luther wrote his stirring chorales. His father Ambrosius began very
early to teach him music, the family profession, and Sebastian
started with the violin.
But the poor little boy lost both father and mother when only ten
years of age, and he was left to be brought up by his elder brother,
Johann Christopher. Sebastian was passionately fond of music and
although Christopher taught him to play the clavier, nevertheless this
sad little tale is told:
Sebastian had seen Christopher with a book of music including
pieces by Froberger, Pachelbel, Buxtehude, and others. Sebastian
was very anxious to get it and play bits from it. Christopher forbade
him to touch it and put it away in a cupboard, which fortunately had
a lattice door, for Sebastian, every night during the full moon,
(because he did not dare to use a candle), copied the book note for
note. When Christopher discovered this, the little lad was soundly
scolded and was witness to Christopher’s burning it before his poor
eyes!
It did not seem to daunt him, for from this time on, he copied the
great works whenever he could.
It became necessary for Sebastian to earn money to save
Christopher’s purse, and in 1700 he became a choir boy at St.
Michael’s in Lüneburg, where he received lessons without paying for
them. He was happy here, with a library where he could copy music
to his heart’s content, and every vacation he went on foot to
Hamburg to learn of the great organist, Reinken. He visited too the
court of Celle where he heard Couperin’s music, which no doubt
helped to develop his style.
Soon he left Lüneburg and went to Saxe-Weimar where he entered
the orchestra of Prince Johann Ernst. But his interest was in the
church and when he was eighteen he tried for the post of organist in
the Church at Arnstadt. He played so delightfully, despite his youth,
that he was accepted at the first hearing!
He composed many works here and learned much about the organ,
that was to be valuable to him and to us. He was well liked, too, and
his playing was enjoyed. Nevertheless, his interest in others was so
great, that he decided to go to see Buxtehude in Lübeck, and he was
so interested in the master’s art that he forgot about his church in
Arnstadt and stayed four months instead of one! When he returned
he was severely reprimanded. Later, he received a second reprimand
which is of tremendous interest for he was accused of “interspersing
the chorale with many strange variations and tones, to the confusion
of the congregation.” He was charged with the crime of being
original!
Due to this lack of sympathy, he accepted a post as organist at
Mühlhausen in 1707 and later in the year married his cousin, Maria
Barbara, with great rejoicings. They had seven children, two of whom
were the famous Wilhelm Friedemann and Karl Philip Emanuel.
The next year he became Concertmaster (first violinist), to the
Duke of Weimar and remained there until 1718. This was a very
fruitful composing period, for he had no money worries. He studied
the Italian masters, especially Vivaldi, and wrote some excellent
cantatas. However, he went soon to the Prince of Anhalt-Cothen, as
Court Choir Master.
He made concert trips from here to Dresden and Leipsic, and it
was in Dresden that he challenged the proud Marchand, the French
organist, to a public improvisation contest on a theme, new to both
of them. But the contest never took place, because, unknown to Bach,
Marchand heard him play and when the time for the contest came,
Marchand had left town hurriedly in an early post-chaise. And
strange as it may seem, Emperor Frederick I gave Marchand one
hundred ducats and Bach got nothing!
Bach’s new patron was a fine man and a Protestant and gave Bach
every chance. At Weimar, he had become well known for his religious
works and beautiful playing. But, as he had no organ, he wrote music
for harpsichord, violin, chamber music and the orchestra, which was
far from “grown up.” Here, too, he wrote the Brandenburg Concertos
and the first part of his epoch-making work The Well-tempered
Clavichord (48 Preludes and Fugues, 1722) which he finished in
1744. It is still the greatest work of its kind. In it he reaches the
highest point of contrapuntal writing.
In 1720, while Bach was traveling with the Prince, his wife died.
After a year and a half he married a charming singer, Anna
Magdalena Wulkens, one of his pupils. They had twelve children and
lived very happily. The lovely little tunes that he wrote for Anna
Magdalena and his children have come down to us and many of us
have played them in the first years of our music study. Isn’t it
wonderful to think that the great Bach, who wrote some of the
masterpieces of the world, could also write simple little Minuets and
Preludes that any child can play?
But with all Bach’s comfort he missed an organ! Deep in his soul,
he craved the making of religious music—it was part of his thinking.
His religious ideas tied up with his music, were his life. So we see this
saint leaving happiness at Cothen for an ill-paid post in Leipsic, as
Cantor (1723) at the school of St. Thomas, where, succeeding Johann
Kuhnau, he stayed the rest of his life and wrote his greatest works.
Bach wrote to a friend that he thought a long while before leaving
his “gracious, music loving and discriminating Prince ... but it
happened that my master married a ... princess who ... weaned my
master from the loving interest he had ... toward our glorious art.
And so God arranged that the post of Cantor at St. Thomas’ should
fall vacant.... I took three months to consider the future and was
induced to accept, as my sons were studious and I was desirous ... of
gratifying their bent by entering them in the school ... and thus, in
the name of the Most High, I ventured and came to Leipsic.”
Note, dear reader, the nobility, spirituality and sweetness here,
thinking of his children and not of his career!
He struggled against the unsympathetic town council, the school,
and lack of money. He wrote to his friend Erdman, “My present
income averages $700. When funerals are numerous I make more,
but if the ‘air is healthy’ then my income falls. During the past year I
have earned $100 less, owing to the small number of deaths.”
In 1732 he wrote one of his few attempts at comedy.—the Coffee
Cantata set to music on a text by Picander. Leipsic had become a
slave to the new luxury, coffee, and in this Picander found material
for a satire.
Besides his regular work, he had to teach dull, undisciplined
pupils, attend to services in four churches, and be satisfied with the
few singers and players he found for the performances he directed.
Yet, fed with the spirit of love that was within him, he was happy
and his home was a center of joy. He never became too sad until he
lost his sight three years before his death. Even then he dictated his
compositions and conquered discouragement!
Bach’s life was made happier when Philip Emanuel became Court
musician and clavier player to Frederick the Great, and he talked so
much of his father that Bach was invited to Potsdam.
When Frederick the Great, who was playing the flute in his
orchestra, heard that Bach was in Potsdam, he put down his flute
and interrupted the concert saying, “Gentlemen, old Bach has
arrived.” Bach appeared in his traveling clothes and was invited to
improvise a fugue in six parts, which he did to the great admiration
of all.
Yet many felt that his writings were lacking in charm! This was no
doubt because people were getting accustomed to the Italian
melodies which had become popular in Germany. Furthermore,
when he wrote “The Art of Fugue” his son could sell but thirty copies
and finally sold the plates for the mere cost of the metal! Students
are grateful that copies of this work were saved, for it is still the
greatest authority on fugue writing.
In 1749, Bach underwent an operation on his eyes but lost his sight
and in 1750 died of apoplexy. So little was he appreciated that his
grave was destroyed in the renovation of the Johanneskirche
grounds. His supposed remains were discovered in 1894 and re-
interred one hundred and forty-four years after his death. But—what
remains of Bach, no known or unknown grave can bury.
A quarter of a century after Bach’s death, Mozart said, on hearing a
Bach Cantata, “At last I have heard something new and have learned
something.” Then later Mendelssohn re-discovered him, and
Schubert, too, helped to bring him to the world’s notice. And not
until 1850, a century after his death, was the Bach Society formed to
honor Bach, the corner-stone of modern music.
Bach was a stalwart man with fine deep eyes, broad forehead and a
grave face, lit with kindly humor. He had dignity and calm, was
always courteous, and criticised only his pupils whom he wanted to
help. When asked one time, how he played so well, he remarked, “I
always have had to work hard.” He could stand no one who was
pretentious and conceited. He wanted his rights but never boasted.
One year besides fulfilling his other duties he wrote a cantata every
Sunday! He wrote them as a preacher writes sermons. They had to be
done and he never neglected his duty.
Bach was a devoted father and husband and his home was one of
the happiest of any great genius. Many of his children were musical
and he said that he had an orchestra in his own home!
Even his little half-witted son had genius and during the last years
of Bach’s life when the dear old man had become blind, the little boy
sat at the clavier, Bach’s favorite instrument, and improvised to the
joy of his father.
Bach’s Works
In the last chapter we saw Bach rescue music from the danger of
emptiness and frivolity, by perfecting polyphonic music and
dignifying church music as it had not been since Palestrina.
Bach and Handel were alike in that they were both born in
Germany when music, especially opera, had become mechanical and
full of set rules. They were both Lutherans and Thuringians. They
worked about the same time, and tried to encourage the hearts and
minds of their country, torn by the Thirty Years’ War; both were
polyphonic masters; both organists. Bach attached himself to
Frederick the Great, the protector of the faith, and Handel went to
England, where there was liberty of thought; and both, died blind
and of apoplexy.
The differences, with so many similarities, are most interesting.
Bach, modest, retiring, was always a German subject; Handel
became an English subject. Bach was a homebody with twenty
children; Handel was a traveler and never married. Bach wanted
only to satisfy himself; Handel, to satisfy the public. Bach was
humble, Handel arrogant. Bach seldom fought for his rights, while
Handel would dismiss even his masters. Bach cared little for
applause, but Handel could not live without it. Bach was devoted to
the lyric, Handel to the epic. Handel is usually (not always) heroic,
Bach is usually religious (not always, of course). Handel is popular,
easy to understand; Bach is deep, coming from the soul, and it takes
more thought than the crowd is always willing to give to appreciate
this giant.
Handel achieved great worldly success, and treated nobles as
equals. Poor Bach worked contentedly in an humble position and
struggled for money and profited by “bad air.” (See page 248.)
Bach demanded faith and love of art, Handel demanded ready
ears. Bach never intended to make music, he only wanted to express
his devotion in the best medium he had; Handel wanted fame and
riches and the approval of the crowd. Handel died rich and Bach died
poor.
George Frederick Handel (1685–1759) who wrote the immortal
oratorio Messiah, and one of the greatest opera composers of his
time, was born in Halle, Saxony. His father was a barber, but
managed to get the title “Chamberlain to the Prince of Saxe-
Magdeburg.”
Handel’s father wished him to study law, but George Frederick did
not like the idea and besides he showed great musical gifts. One day
when he was a little boy, he found hidden in the attic, a clavichord
upon which he secretly played every chance he had.
Not long after this “find,” something most important happened.
His father was going to Weissenfels to the Duke’s castle and had no
intention of taking George Frederick with him. So, Father Handel
seated himself in the coach, taking things comfortably, when he
spied little George Frederick dashing along by the great wheels. He
paid no attention to him, but after going a mile and realizing that the
little boy was still following, he called out “What do you want?” “I
want to go with you,” answered Handel, and although his father was
quite annoyed, George Frederick’s will, as always, prevailed and he
went with his father! At the court the Duke saw, very quickly, how
gifted the little Handel was. His father relented and on his return to
Halle, George Frederick was given instruction on the organ,
harpsichord and in composition with Zachau, and taught himself the
oboe and violin, greedily mastering all the music he could find.
Although he studied music he seems to have respected his father’s
wishes and studied law and even after his father died in 1697, he
continued, but later gave it up for music. At seventeen he entered the
University, and studied, besides music, the literary classics which
were of great use to him later.
On leaving the University he went to Hamburg, the musical center
of Germany, where he heard Keiser’s works and received good advice
from Johann Mattheson, the composer, tenor and conductor, who
later engaged George Frederick in a duel.
The quarrel came about in this way: Handel was to lead
Mattheson’s opera, Cleopatra, in order to relieve Mattheson, who
sang the part of Antonio. After Antonio was “killed,” Mattheson
being free to lead, entered the orchestra pit to take Handel’s place as
leader. Handel was infuriated. They met later and fought a duel in
which Handel was saved by a large metal button which snapped
Mattheson’s rapier! What a little thing a button is and what it did for
music!
Handel’s first four operas were written here for the Hamburg
stage. But Almira (1705) is the only one ever heard now.
Handel in Italy
After his ill success with the Italian Opera House, he gave up
writing operas and devoted himself to oratorios. In thirteen years
(1739–1752) he wrote nineteen. Among these are Saul in which is the
famous “Dead March,” Joseph, and many other important ones, but
towering over all The Messiah, and Heracles, which Romain Roland
says is “one of the artistic summits of the 18th century.”
They are not all oratorios, for Heracles and several others are not
religious in subject, but are dramatic epics.
Handel’s sight failed him, but even this did not stop his torrential
activity to his death in 1759.
He had become an English subject, so was buried with pomp at
Westminster Abbey.
He was loved even though he was fiery of temper, and had a will
that no one could conquer.
His music is full of his gusts of feeling but always correct and his
art perfect. In his work he always held himself under great control
and it mirrors his power and balance. He loved wind instruments
and people often considered his music noisy!
He wrote forty-two operas, two passions, ninety-four cantatas, ten
pasticcios, serenatas, songs and the instrumental works mentioned
above. The famous Handel Largo comes from one of his operas,
Xerxes, and was an aria Ombra mai fu (Never was there a Shadow).
Handel used counterpoint, but always knew when to unbend and
use delightful flowing melody, so he became popular.
Other men, Hasse, Telemann and Graun, contemporaries of
Handel, followed the popular Italian models but without Handel’s
genius for melody and sublimity, and were never heard of after their
own generation had passed away.
Handel’s Messiah, which he wrote in twenty-four days, was first
given in Dublin. It took the people by storm and when the king heard
it, thrilled by the “Hallelujah Chorus,” he rose to his feet, and since
then it is the custom to stand during that number. It has become the
Christmas Oratorio and is sung in churches and societies all over the
world. It has lost none of its first popularity among the people and is
loved as few works have ever been. It thrills because it is sincere, big,