Last active
February 20, 2025 11:28
-
-
Save vfarcic/0d73463668d1f75ac0e94c7cd7d03fed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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