DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Git Kata

Git Kata

Jens Schauder user avatar by
Jens Schauder
·
Sep. 22, 12 · Interview
Like (2)
Save
Tweet
Share
8.42K Views

Join the DZone community and get the full member experience.

Join For Free

I use Git for quite some time now. But all the time I used it only in private projects where you don’t have to deal with merges and stuff. But since I’m using it in a real project with multiple developers, I’m realy at awe with the power of Git. It is extremely flexible and I can do all kinds of stuff with it I couldn’t even think about with SVN.

As you learn very quickly when starting with Git, Git is very different from most Version Control Systems you might know. This means in order to use Git you have to learn a lot. And learning is best done, by doing whatever you want to learn. This brought up the idea of Git Katas.

Kata is a form of practice with its origins in the martial arts, but the term is also popular in the software development community. The idea is that you practice a task, throw away the result and do it again. Over and over again.

The great thing is: Git (and the public repository infrastructure of GitHub) are great for actually setting up such Katas for learning Git.

And so when we were on a train to Nürnberg for the great little conference Herbstcampus KronekerDelta and I created a first Git Kata and by now we already have a second. It works like this:

  • The Katas assume you work with the console. Note that the Windows Git installation includes the Git Bash which allows you to run Unix Scripts which are part of the Katas on Windows as well.
  • You clone the Git Kata repository to a local repository on your machine.
  • You clone the repository again in a second directory. This is where you will work for the kata. Cloning twice has two important consequences: If you screw up your Kata you can simply remove the second directory and recreate it as a fresh clone. Secondly some Katas require you to push work results to the remote repository, which will be your first clone.
  • Change directory into the second repository and checkout the Kata you want to do. Each Kata is a Git branch starting with kata_. So you can type git checkout kata_ in order to get a list of valid katas available.
  • In the second repository you’ll find a startKata.sh script. Run it. It will do changes to your repository and print the task for this Kata on the console. The task is also included in a readme.txt file in the Kata branch.
  • Happy Gitting.

KronekerDelta and I learned a lot about Git when creating the first Katas and I hope you will enjoy and learn when doing them.

If you know a little Git you are likely to know more then we do and the Katas aren’t really a challange for you. If this is the case, how about providing your own Kata? Just create an orphan branch. Setup a startKata.sh and a readme.txt and let me know about it by opening an issue or a comment below or an e-mail at jens at schauderhaft de. I’ll pull it and add it to the existing katas. Note that a pull request on github doesn’t seem to work with orphan branches.

Also any feedback is extremely welcome in the comments below, in your own blog posts with a trackback to this article, or in the GitHub issue system.

Just in case you mist the links above. Here is the Git Kata repository, and here is the Git Kata home page.

Git Kata (programming)

Published at DZone with permission of Jens Schauder, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Quick Pattern-Matching Queries in PostgreSQL and YugabyteDB
  • Java Development Trends 2023
  • Top Authentication Trends to Watch Out for in 2023
  • The Top 3 Challenges Facing Engineering Leaders Today—And How to Overcome Them

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: