Conversation
Notices
-
@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.
- HallÄ Kitteh likes this.
- HallÄ Kitteh repeated this.
-
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.
-
git symbolic-ref HEAD