A UNIX programmer was working in the cubicle farms. As she saw Master Git traveling down the path, she ran to meet him.

“It is an honor to meet you, Master Git!” she said. “I have been studying the UNIX way of designing programs that each do one thing well. Surely I can learn much from you.”

“Surely,” replied Master Git.

“How should I change to a different branch?” asked the programmer.

“Use git checkout.”

“And how should I create a branch?”

“Use git checkout.”

“And how should I update the contents of a single file in my working directory, without involving branches at all?”

“Use git checkout.”

After this third answer, the programmer was enlightened.
@lambadalambda "and when should I use git branch, then?"
"sorry... git what?"
@efi
A novice was learning at the feet of Master Git. At the end of the lesson he looked through his notes and said, “Master, I have a few questions. May I ask them?”

Master Git nodded.

“How can I view a list of all tags?”

“git tag”, replied Master Git.

“How can I view a list of all remotes?”

“git remote -v”, replied Master Git.

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

“git branch -a”, replied Master Git.

“And how can I view the current branch?”

“git rev-parse --abbrev-ref HEAD”, replied Master Git.

“How can I delete a remote?”

“git remote rm”, replied Master Git.

“And how can I delete a branch?”

“git branch -d”, replied Master Git.

The novice thought for a few moments, then asked: “Surely some of these could be made more consistent, so as to be easier to remember in the heat of coding?”

Master Git snapped his fingers. A hobgoblin entered the room and ate the novice alive. In the afterlife, the novice was enlightened.
git symbolic-ref HEAD