...

/

Git Kata 7: Collaboration as Ken

Git Kata 7: Collaboration as Ken

Learn about two contributors pushing commits to a shared repository.

This kata is all about two contributors pushing commits to a shared repository. Given that there’s only one of you, you’ll have to do a little role-playing. Starting with this kata, you’ll be playing the part of Ken and Carrie Coder.

First, we’ll clone the web-storelist repository as Ken, then again as Carrie. We’ll then switch back and forth between Ken and Carrie’s local repositories, making commits and pushing them to the Gogs server. We’ll also see how to get commits from a remote repository while updating a local repository.

Open two terminals using the plus (+) sign:

Press + to interact
Terminal 1
1 / 2
Terminal 1

Step 1: Clone and configure the repository

In the Ken window below is the command to clone the repository:

Press + to interact
cd /home/devops/dk
git clone $EDUCATIVE_LIVE_VM_URL:3000/devops/web-storelist ken.coder

Commands

Command / Parameter  

Description

cd /home/devops/dk

This changes to the dk directory in the home directory of the current user, devops


git clone $EDUCATIVE_LIVE_VM_URL:3000/devops/web-storelist ken.coder

The git clone command retrieves a remote repository.

The first parameter is http://ken.coder@localhost:3000/....

This is the URL to the remote repository.

The second parameter is ken.coder.

This is the directory in which to initialize and download the remote. If the directory doesn't exist, it will be created.

This step uses the git clone command to retrieve a repository from a remote ...