Data Engineering · Git and GitHub
How Git and GitHub Helps You Land a Data Engineer Job Faster
Quick summary — how Git and GitHub help you land a data engineer job
Git and GitHub help you land a data engineer job faster because data teams manage pipelines, SQL and infrastructure as code. Knowing branches, pull requests, code review and CI means you fit their workflow from day one. A clean GitHub portfolio with tested pipeline projects also gives recruiters proof of practical skill that a resume line cannot.
In this guide you will learn:
- Why data teams use Git — pipelines, SQL models and configs are code.
- A data engineering repo — structure, .gitignore and safe secrets.
- GitHub Actions for data — lint SQL and test transforms on every PR.
- Templates — README, PR description and portfolio checklist.
- Interview questions — Git questions asked in data engineer interviews.
SECTION 01Why data engineering teams live in Git
A data engineer's work is mostly code: Python scripts that extract data from APIs and databases, SQL that cleans and models it, orchestration files for tools such as Apache Airflow, transformation projects in dbt, and infrastructure definitions for the cloud. All of it changes often and is shared between several people. Teams keep it in Git so every change is tracked, reviewed and reversible, and they host it on platforms such as GitHub where pull requests and automated checks happen.
For a job seeker this matters in two ways. First, interviewers expect you to work in this flow without training: create a branch, commit a change, open a pull request and respond to review comments. Second, your public GitHub profile is evidence. A recruiter or hiring manager can open your repositories and see whether your pipeline actually runs, whether you write tests and how you describe your work.
| Data artefact | Why it belongs in Git | Typical tool | Risk without Git |
|---|---|---|---|
| Ingestion scripts | Track changes to source logic and API handling | Python | Nobody knows which version loaded the data |
| SQL models | Review business logic before it changes reports | dbt or plain SQL files | Silent changes to key metrics |
| Orchestration DAGs | Schedule and dependency changes need review | Apache Airflow | Broken schedules found too late |
| Infrastructure and config | Repeatable warehouse and cloud setup | Terraform, YAML | Environments drift apart |
# Change a SQL model safely
git switch main
git pull
git switch -c feature/add-refund-column
# edit models/marts/fct_orders.sql
git add models/marts/fct_orders.sql
git commit -m "Add refund_amount to fct_orders"
git push -u origin feature/add-refund-column
# Open a pull request on GitHub, address review comments:
git add models/marts/fct_orders.sql
git commit -m "Use COALESCE for orders without refunds"
git push
# Who changed this metric logic, and when?
git log --oneline -- models/marts/fct_orders.sql
# Line-by-line authorship of a SQL file
git blame models/marts/fct_orders.sql
# What exactly changed between two commits?
git diff a1b2c3d e4f5a6b -- models/marts/fct_orders.sql
# Find the commit that broke a test (binary search)
git bisect start
git bisect bad HEAD
git bisect good v1.2.0
# run tests at each step, mark good/bad, then:
git bisect reset
SECTION 02Structuring a data engineering repository the right way
A tidy repository tells a reviewer you understand how real projects are organised. Keep source code, SQL, tests, configuration and documentation in clear folders, include a requirements or project file so others can install dependencies, and add a README that explains how to run the pipeline end to end. Many beginner portfolios fail here: everything sits in one notebook with no instructions.
Data repositories have two special rules. Never commit secrets such as database passwords or API keys; read them from environment variables and commit only an example file. And never commit large data files or generated outputs; Git is built for code, not datasets. Use a small sample dataset for tests and a .gitignore that excludes raw data, virtual environments and local warehouse files.
| Folder or file | What goes in it | Commit it? | Reviewer impression |
|---|---|---|---|
| src/ and dags/ | Ingestion code and Airflow DAGs | Yes | Logic is easy to find |
| sql/ or models/ | Transformations and data models | Yes | Business logic is reviewable |
| tests/ with sample data | Unit tests and small fixture files | Yes | Candidate cares about quality |
| .env, raw data, outputs | Secrets, large files, generated results | No, add to .gitignore | Safe and professional |
sales-pipeline/
|-- README.md
|-- requirements.txt
|-- .env.example # variable names only, no real values
|-- .gitignore
|-- src/
| |-- extract.py # pull data from API / source DB
| |-- transform.py # clean and reshape with pandas
| `-- load.py # write to the warehouse
|-- sql/
| |-- staging_orders.sql
| `-- fct_daily_sales.sql
|-- dags/
| `-- sales_daily.py # Airflow DAG
|-- tests/
| |-- data/sample_orders.csv
| `-- test_transform.py
`-- .github/
`-- workflows/ci.yml
# Python
__pycache__/
*.pyc
.venv/
# Secrets - never commit
.env
*.pem
credentials*.json
# Data and outputs - too large and often private
data/raw/
data/processed/
*.parquet
*.duckdb
output/
# Notebooks checkpoints and editor files
.ipynb_checkpoints/
.vscode/
.DS_Store
# Keep small test fixtures
!tests/data/*.csv
SECTION 03GitHub Actions: tests and checks for data pipelines
The skill that most separates a strong data engineering portfolio from an average one is automated testing. With GitHub Actions you can run checks on every pull request: install dependencies, run pytest on your transformation functions, lint SQL with a tool such as SQLFluff, and fail the build if anything breaks. A green check mark beside each pull request shows that you treat data code like production software.
Testing data code is different from testing a web app. You test that a transform removes duplicates, handles missing values, keeps the right columns and produces the expected totals on a small sample. You do not need a real warehouse in CI; a sample CSV and an in-process engine such as DuckDB or pandas are enough. In interviews, being able to say 'my pipeline has tests that run on every pull request' is a strong signal.
| Check | Tool | What it catches | Runs when |
|---|---|---|---|
| Unit tests on transforms | pytest with sample data | Wrong logic, dropped rows, bad types | Every pull request |
| SQL linting | SQLFluff | Inconsistent or invalid SQL style | Every pull request |
| Python linting | ruff or flake8 | Unused imports, obvious bugs | Every pull request |
| Scheduled data checks | Actions schedule trigger | Source API changes, stale data | On a cron schedule |
# src/transform.py
import pandas as pd
def clean_orders(df: pd.DataFrame) -> pd.DataFrame:
out = df.drop_duplicates(subset="order_id").copy()
out = out.dropna(subset=["amount"])
out["order_date"] = pd.to_datetime(out["order_date"])
return out[["order_id", "customer_id", "order_date", "amount"]]
# tests/test_transform.py
import pandas as pd
from src.transform import clean_orders
def test_clean_orders_removes_duplicates_and_nulls():
raw = pd.DataFrame({
"order_id": [1, 1, 2, 3],
"customer_id": [10, 10, 11, 12],
"order_date": ["2026-01-05"] * 4,
"amount": [500.0, 500.0, None, 250.0],
})
out = clean_orders(raw)
assert list(out["order_id"]) == [1, 3]
assert out["amount"].sum() == 750.0
# .github/workflows/ci.yml
name: data-pipeline-ci
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -r requirements.txt pytest ruff sqlfluff
- name: Lint Python
run: ruff check src tests
- name: Lint SQL
run: sqlfluff lint sql --dialect postgres
- name: Unit tests
run: pytest -q
SECTION 04Templates: README, pull request and portfolio checklist
Use these to turn a working pipeline into a GitHub project that hiring managers can understand in a couple of minutes, and to practise the pull request habits teams expect.
# Daily Sales Pipeline

## What it does
Extracts orders from a public API, cleans them with pandas,
loads them into PostgreSQL and builds a daily sales table.
## Architecture
API -> extract.py -> transform.py -> load.py -> fct_daily_sales
Scheduled by Airflow (dags/sales_daily.py)
## Run locally
cp .env.example .env # add your own DB settings
pip install -r requirements.txt
python -m src.extract && python -m src.transform && python -m src.load
## Tests
pytest -q (also runs on every pull request)
## Design decisions
- Incremental load by order_date to avoid full reloads
- Duplicates removed on order_id before loading
## What I would add next
Data quality alerts and a backfill command
## What
Add refund_amount to fct_daily_sales.
## Why
Finance needs net sales (gross minus refunds) in the daily report.
## How
- Joined staging_refunds on order_id (LEFT JOIN, keeps orders without refunds)
- COALESCE(refund_amount, 0) so totals are never NULL
## How I tested
- New test: test_net_sales_with_refunds
- Ran the model on sample data; daily totals match a manual check
## Impact
- New column only; existing columns unchanged
- Dashboards using net_sales need a refresh after merge
GITHUB PORTFOLIO CHECKLIST - data engineer
Profile
[ ] Profile README: role target, skills, links to best repos
[ ] 2-4 pinned repositories, all data engineering related
Each pinned repo
[ ] README with problem, architecture, run steps
[ ] Small sample data in tests/, no large or private files
[ ] No secrets in code or history (.env.example only)
[ ] Tests plus a GitHub Actions workflow that passes
[ ] Meaningful commit messages, not 'update' x 40
[ ] At least one merged pull request showing review flow
Coverage across repos
[ ] Python ingestion
[ ] SQL modelling
[ ] Orchestration (Airflow or similar)
[ ] One cloud or warehouse component
SECTION 05Tips for using Git and GitHub in your data engineer job search
Small Git habits make a large difference to how your work is judged:
- Commit like a professional — write short, specific messages such as 'Deduplicate orders on order_id' instead of 'changes'.
- Use pull requests even when working alone — merging your own branches through PRs leaves a visible review trail in your repository.
- Keep notebooks out of the core — explore in notebooks, but move final logic into tested Python modules.
- Fewer, better repositories — three complete, tested pipeline projects beat twenty unfinished tutorial copies.
- Link GitHub everywhere — put your profile on your resume and LinkedIn, and mention specific repos in interviews.
SECTION 06Interview Q&A — Git for data engineer roles
Q1What is the difference between git merge and git rebase?
Merge combines two branches by creating a merge commit and keeps the full branch history. Rebase moves your commits on top of another branch, producing a straight, linear history. I rebase my own feature branch before opening a pull request, but avoid rebasing branches others already use.
Q2How do you handle secrets in a data pipeline repository?
I never commit them. Code reads credentials from environment variables or a secrets manager, and the repository contains only an .env.example with variable names. The real .env is in .gitignore. In GitHub Actions, I use encrypted repository secrets instead of plain text values.
Q3Should large datasets be stored in Git?
No. Git is designed for source code and becomes slow with large binary files. Datasets belong in object storage, a data lake or a warehouse. I keep only small sample files in the repository for tests, and tools like Git LFS or data versioning tools exist for special cases.
Q4How would you test a data transformation in CI?
I write pytest tests that run the transform on a small sample DataFrame and assert row counts, column names, types and key totals. GitHub Actions installs dependencies and runs those tests on every pull request, so a broken transform is caught before it is merged.
Q5A metric in a report changed unexpectedly. How can Git help?
I check git log and git blame on the SQL model behind that metric to see recent changes and their authors, then read the pull request discussion for context. If needed, I compare commits with git diff or use git bisect with a test to find the exact change.
SECTION 07Test yourself — Git and GitHub for data engineers quiz
Five questions. No sign-up.
0 / 5Pick an answer to see why it is right or wrong.
SECTION 08Frequently asked questions
Do data engineers need to know Git?
Yes. Data engineers write pipelines, SQL models and infrastructure code that teams change together, so Git is a standard daily tool. Most interviews assume you can branch, commit, open pull requests and resolve merge conflicts without help.
What GitHub projects should a data engineer fresher build?
Build two to four end-to-end projects: an ingestion script from an API or database, SQL transformations into clean tables, a scheduled workflow with Airflow or similar, and tests running in GitHub Actions. Each should have a clear README and small sample data.
Is GitHub Actions useful for data engineering?
Yes. It can run unit tests on transformations, lint Python and SQL, and run scheduled jobs for simple checks. Many teams use dedicated orchestrators for production pipelines, but GitHub Actions is widely used for CI on data code.
How do I show Git skills on a data engineer resume?
List Git and GitHub under skills, but prove them through links. Point to repositories with meaningful commit history, merged pull requests, a passing CI workflow and clean structure. In interviews, describe how you reviewed or fixed a change using Git.
Can I learn Git and GitHub for data engineering for free?
Yes. Git is free and open source, GitHub offers free public repositories and GitHub Actions minutes for public projects, and the official Git documentation and Pro Git book are free online. Check GitHub's current plan limits on its website.
SECTION 09Related reads
Classroom & online · Noida
Build the Python skills behind data pipelines
Our Python Training Course covers core Python, pandas, SQL, Git and project work you can publish on GitHub, with portfolio review and mock interviews. Confirm the current syllabus with a counsellor.
Talk to a counsellor for current fees- Python, pandas & SQL
- Git & GitHub projects
- Portfolio review & mock interviews
- Weekday & weekend batches