Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active May 10, 2023 18:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save vfarcic/0d73463668d1f75ac0e94c7cd7d03fed to your computer and use it in GitHub Desktop.
Save vfarcic/0d73463668d1f75ac0e94c7cd7d03fed to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/0d73463668d1f75ac0e94c7cd7d03fed
###############################################
# GitHub CLI #
# How to manage repositories more efficiently #
# https://youtu.be/BII6ZY2Rnlc #
###############################################
# Referenced videos:
# - Ketch - How to Simplify Kubernetes Deployments: https://youtu.be/sMOIiTfGnj0
#########
# Setup #
#########
# Install `gh` CLI from https://github.com/cli/cli#installation
gh auth login
# Replace `[...]` with the GitHub organization or user
export DOCKERHUB_ORG=[...]
#############################
# Forking and cloning repos #
#############################
# Open https://github.com/shipa-corp/ketch
gh repo fork shipa-corp/ketch \
--clone
cd ketch
git remote -v
git checkout -b my-feature
echo "Is this a feature?" \
| tee something.txt
git add .
git commit -m "Test"
git push --set-upstream origin my-feature
####################
# Creating secrets #
####################
# Replace `[...]` with the Docker Hub token. It can be fake for the purpose of the exercises.
gh secret set \
DOCKERHUB_TOKEN -b"[...]" \
--repos $DOCKERHUB_ORG/ketch
# Replace `[...]` with the Docker Hub user. It can be fake for the purpose of the exercises.
gh secret set \
DOCKERHUB_USERNAME -b"[...]" \
--repos $DOCKERHUB_ORG/ketch
##########################
# Creating pull requests #
##########################
gh pr create \
--title "My feature" \
--body "Read the title"
gh pr status
#########################
# Merging pull requests #
#########################
gh pr merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment