Remember to keep your token secure and never share it publicly. If you believe your token has been compromised, you should revoke it immediately and generate a new one.
For the github lab: go to your command window and directory, and do this:
gh auth login
Now review these updated files on the GitHUB repository
Now let’s demonstrate making changes on the Cloud and pulling (syncing) them down to local
Basic Commands
Repository Operations
bash
# Clone a repository
gh repo clone username/repository
# Create a new repository
gh repo create
# Fork a repository
gh repo fork username/repository
Working with Pull Requests
Creating Pull Requests
bash
# Create a new pull request
gh pr create
# List pull requests
gh pr list
# Check out a pull request locally
gh pr checkout [PR-NUMBER]
Reviewing Pull Requests
bash
# View PR status
gh pr status
# Review a pull request
gh pr review [PR-NUMBER]
# Merge a pull request
gh pr merge [PR-NUMBER]
Common Workflows
Pulling from Repository
bash
# Fetch and pull latest changes
gh repo sync
# Pull specific branch
git pull origin [branch-name]
Pushing to Repository
bash
# Stage changes
git add .
# Commit changes
git commit -m "Your commit message"
# Push to remote
git push origin [branch-name]
Advanced Features
Issue Management
bash
# Create new issue
gh issue create
# List issues
gh issue list
# Close issue
gh issue close [ISSUE-NUMBER]
Repository Maintenance
bash
# View repository status
gh repo view
# List repository contributors
gh repo contributors
Best Practices
Always pull before starting new work
Create descriptive commit messages
Use branches for new features
Review changes before pushing
Keep your local repository up to date
Troubleshooting
Common Issues
cmd window:
# Reset authentication
gh auth logout
gh auth login
# Check CLI version
gh --version
# Get help
gh help
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (