GitHub Best Practices - Overview¶
List of References (Click to expand)
- Deleting Your Commit History?
- Generating a new SSH key and adding it to the ssh-agent
- Adding a new SSH key to your GitHub account
- GitHub installation
- Free Password Generator
- Learn Git Branching
- GitHub Commands Glossary
- MARKDOWN CHEAT SHEET
- GitHub Copilot Trust Center -FAQs
- Accessing compliance reports for your organization
- STAR Registry Listing for GitHub
Why GitHub for DevOps and Azure?¶
GitHub is the world’s leading platform for version control and collaboration. Used with Azure, it enables:
- Continuous Integration/Continuous Deployment (CI/CD) using GitHub Actions or Azure Pipelines.
- Infrastructure as Code (IaC) through integration with tools like Terraform or Bicep.
- Automation for testing, security, and delivery.
- Collaboration using pull requests, code reviews, and issues—all traceable to Azure Boards.
How to Commit/Push to GitHub¶
This section summarizes the standard workflow for contributing code.
Tip
For secure Azure DevOps integration, set up SSH keys (see reference).
-
Clone the repository
git clone <repo-url>
(Use SSH for better security and automation in CI/CD pipelines.)git -c http.sslVerify=false clone <repository-name - ssh> -
Change directory and open in VS Code
cd <repo-path>
code . -
Sync with latest changes
git pull -
Create a new branch for your feature/bugfix
git checkout -b <branch-name> -
Check status, stage, and commit
git status
git add -A
git commit -m "Description" -
Push your branch
git push origin <branch-name> -
(Optional) Pull latest changes from remote
git pull origin <branch-name>
Troubleshooting:
- If you get SSL or permission errors, verify your SSH key setup and repository access.
- Use git config --global user.name and git config --global user.email to set your identity.
GitHub Actions: Automate with Azure¶
You can automate builds, tests, and deployments to Azure using GitHub Actions:
- Deploy web apps, containers, or functions to Azure.
- Run Terraform/Bicep scripts for infrastructure provisioning.
- Integrate security scans and compliance checks into your CI/CD.
Good Content List Format¶
<details markdown="1"><summary> <a href=""> </a></summary><ul>
<li> <a href=""> </a> </li>
<li> <a href=""> </a> </li>
<li> <a href=""> </a> </li>
<li> <a href=""> </a> </li>
<li> <a href="" > </a> </li>
<li> <a href="" > </a> </li>
<li> <a href="" > </a> </li>
</details></li> <!-- End -->