From Code to Performance

Tutorial 1: Advanced Git and Github

Mastering Git and GitHub for collaborative software development.

1. Branching Strategies

Branches let multiple developers work on the same project independently.

Common models

git checkout -b feature/login-auth
git push origin feature/login-auth

2. Pull Requests & Code Reviews

Tip: Use "Draft Pull Requests (PRs)" for work in progress - it signals collaboration without merging prematurely.

3. Handling Merge Conflicts

When two people change the same file, Git requires manual resolution.

git pull origin main
# Fix conflicts
git add .
git commit -m "Resolve merge conflicts"

Use git diff or gh pr checkout PR number to inspect changes before merging.

4. GitHub Project Tools

# .github/workflows/python-tests.yml
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: pytest