Koans Gita

Original author: Steve Losch
  • Transfer
Based on the " Koans of Wim ."

Silence
One thing, but good
Only to the gods
Hobgoblin
Long and short

Silence


The Python programmer transferred his file to ~/.gitconfigmaster Geet. Among the lines of code was the following:

[alias]
; Явное лучше подразумеваемового. Если мы хотим выполнить слияние,
; нам следует сделать это самим.
pull = pull --ff-only

Master Geet nodded. " git pull origin master", Said the programmer.

Master Geet posted the latest latest changes in masterand automatically merged with the changes to the programmer.

“But Master Geet, haven't I asked to use only fast-forward in my configuration?” She cried out.

Master Geet looked at her, nodded, and said nothing.

“Then why didn't you warn me about a problem with my configuration?” She asked.

Master Geet replied: “There were no problems in her.”

Months later, when a programmer read for another reason git --help config, she achieved enlightenment.

One thing but good


The Unix programmer worked on a cube farm. She saw Master Geeta walking along the path, and ran out to meet him.

“It is an honor to meet you, Master Geet,” she said. “I taught the Unix way of building programs, according to which everyone should do one thing, but well. Sure, I can learn a lot from you. ”

“Sure,” replied Master Geet.

“How can I go to another branch?” - asked the programmer.

“Use git checkout.”

"How do I create a branch?"

“Use git checkout.”

“How can I update the contents of a single file in my working directory without using branches at all?”

“Use git checkout.”

After the third answer, the programmer suffered enlightenment.

To the gods only


The great historian tried to unravel the tangle of complexities of the wrong merger that happened many months ago. He made a pilgrimage to the master Gita to ask for his help.

“Master Geet,” said the historian, “what is the nature of history?”

“History is immutable. Rewriting it later means harming the very substance of the creature. ”

The historian agreed, and then asked: “And therefore, is not the relocation of the commits that have been submitted?”

“Truly,” replied Master Geet.

"Sumptuously!" - exclaimed the historian. “I have a historical record of a merge commit with two other parents. How can I find out which branch each parent comes from? ”

“History is fleeting,” replied Master Geet, “the knowledge you seek is available only to the gods.”

The historian bowed his head, and enlightenment struck him.

Hobgoblin


The apprentice followed the path of Master Geeta. Towards the end of the lesson, she looked at her notes and asked: “Master, I have a few questions. May I ask them? ”

Master Geet nodded.

"How to view a list of all tags?"

" git tag", Answered Master Geet.

“How do I view a list of all deleted repositories?”

" git remote -v", Answered Master Geet.

“How do I view a list of all branches?”

" git branch -a", Answered Master Geet.

“How can I view the current branch?”

" git rev-parse --abbrev-ref HEAD", Answered Master Geet.

"How to delete a remote repository?"

" git remote rm", Answered Master Geet.

"How do I delete a branch?"

" git branch -d", Answered Master Geet.

The student thought for a while, then asked: “Of course, some of these teams could be more consistent, so that it would be easier to use them in the heat of coding?”

Master Geet snapped his fingers. A hobgoblin appeared in the room and ate the student alive. In the afterlife, enlightenment descended upon her.

Long and short


Master Geet and the student walked along the bridge.

The student, wanting to adopt the unlimited knowledge of Master Geeta, said: " git branch --help."

Master Geet sat down and gave a lecture on the seven forms git branchand their many options.

They went further. A few minutes later, they met with an experienced developer traveling in the opposite direction. He greeted Master Geeta and said: " git branch -h." Master Geet briefly informed him of the most common options git branch. The developer thanked him and continued on his way.

“Master,” said the student, “what is the nature of long and short teams? "I thought they were equivalent, but when the developer used it -h, you said something different from what was said at --help."

“Perspective is everything,” the master answered.

The apprentice was puzzled. She decided to experiment and said: " git -h branch."

Master Geet turned and jumped off the railing of the bridge, to the stones, down to his death.

At the sight of this, enlightenment descended on the student.

Also popular now: