User Tools

Site Tools


kubernetes_github_workflow

This is an old revision of the document!


Overview

How to contribute to Kubernetes via GitHub.

The workflow

First, create a GitHub fork of https://github.com/kubernetes/kubernetes.

Create the appropriate Go working directory:

$ mkdir -p ~/go/src/k8s.io
$ cd ~/go/src/k8s.io

Make a local clone of your GitHub fork:

$ git clone https://github.com/rpjday/kubernetes

Move into the cloned directory, and verify the single remote defined thus far:

$ cd kubernetes
$ git remote -v
origin	https://github.com/rpjday/kubernetes (fetch)
origin	https://github.com/rpjday/kubernetes (push)
$

Define the remote upstream for the official Kubernetes repo, and make sure you can't push to it:

$ git remote add upstream https://github.com/kubernetes/kubernetes.git
$ git remote set-url --push upstream no_push
$ git remote -v
origin	https://github.com/rpjday/kubernetes (fetch)
origin	https://github.com/rpjday/kubernetes (push)
upstream	https://github.com/kubernetes/kubernetes.git (fetch)
upstream	no_push (push)
$

Finally, reguilarly pull new content and merge it into the master branch:

$ git checkout master
$ git fetch upstream
$ git merge upstream/master
kubernetes_github_workflow.1523197278.txt.gz · Last modified: 2018/04/08 14:21 by rpjday