Skip to content

Instantly share code, notes, and snippets.

View TommyStarK's full-sized avatar

Thomas Milox TommyStarK

  • 07:58 (UTC +02:00)
View GitHub Profile
@TommyStarK
TommyStarK / git-repo-demo.yaml
Created January 21, 2021 13:30 — forked from tallclair/git-repo-demo.yaml
More secure GitRepo volumes
# Example of using an InitContainer in place of a GitRepo volume.
# Unilke GitRepo volumes, this approach runs the git command in a container,
# with the associated hardening.
apiVersion: v1
kind: Pod
metadata:
name: git-repo-demo
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
@TommyStarK
TommyStarK / delete_git_submodule.md
Created January 18, 2021 18:18 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule