Contenu connexe Similaire à Git deep dive – chopping Kubernetes (20) Plus de Stefan Schimanski (7) Git deep dive – chopping Kubernetes2. • monorepo github.com/kubernetes/kubernetes
• embedded staging repos
• github.com/kubernetes/api
• github.com/kubernetes/apimachinery
• github.com/kubernetes/apiserver
• github.com/kubernetes/client-go
• ...
• published nightly with tags, branches
• rewriting Godeps.json
• Kubernetes-commit: <sha1>
6. $ git cat-file –p HEAD
tree 4a541f0a3b26ab7ef8eb38090072558cd8aa54cd
parent 3667154d8524e58db0e21b9338f335f5c53dd83e
parent 951d2c060e0fa173f82bc221e388f9491709c52c
author Kubernetes Submit Queue <k8s-merge-robot@users.noreply.github.com> 1508409674 -0700
committer GitHub <noreply@github.com> 1508409674 -0700
Merge pull request #54192 from mkumatag/versioned_busybox
8. $ git hash-object –w <filename> # Copy into repository
<blob-sha>
$ git update-index --add --cacheinfo 100644 <blob-sha> <filename>
$ git write-tree
<tree-sha>
$ git commit-tree -p <parent-sha> -m “Commit message“ <tree-sha>
<commit-sha>
14. • monorepo github.com/kubernetes/kubernetes
• embedded staging repos
• github.com/kubernetes/api
• github.com/kubernetes/apimachinery
• github.com/kubernetes/apiserver
• github.com/kubernetes/client-go
• ...
• published nightly with tags, branches
• rewriting Godeps.json
• Kubernetes-commit: <sha1>
20. Using Go instead of bash
• Native (non-cgo) go library: https://github.com/src-d/go-git
• Rewritten “git filter-branch“ to not drop ff-merges
• Do we need cherry-picks?