_____ _ _
/ ____(_) |
| | __ _| |_
| | |_ | | __|
| |__| | | |_
\_____|_|\__|
mkdir <<your-repo-name>> && cd <<your-repo-name>>
git init && echo "node_modules/\n.DS_Store\n*.log\n.env" > .gitignore && git add . && git commit -m "Initial commit"
gh repo create your-repo-name --private --source=. --remote=origin --pushDrop --private for public repos.
git checkout main && git pull & git checkout -b <<feature-branch-name>>
git push -u origin <<feature-branch-name>>The -u flag = create remote branch.
git checkout <<feature-branch-name>> && git pull
git fetch origin && git rebase origin/mainFix conflicts π€
git push --force-with-lease
gh pr create --base main --head <<feature-branch-name>> --title "title" --body "description"Or just gh pr create for interactive mode. β¨
git checkout <<feature-branch-name>> && git pull && git fetch origin && git rebase origin/main && git push --force-with-leasePR auto-updates. π―
git branch --show-current # where am i
git branch -a # show me everything
gh pr status # what's cooking
git rebase --abort # panic buttonPro tip: --force-with-lease is safer than --force. Skydiving vs base jumping.
Share freely. Fork liberally.