GitHub Repository Management
Module 1 - GIST 604B
Building Professional Portfolios Through Proper Repository Structure
Today we're covering professional GitHub repository management. This is about building your portfolio
and showing professionalism through proper repository structure and documentation.
Why Repository Management Matters
πΌ Your GitHub is Your Portfolio
First impression for employers and collaborators
π’ Real-World Statement
"I've hired people based on their GitHub" - Common from tech managers
β° Time Saver
Good documentation reduces support burden
π Future-You Will Thank You
6 months later, you'll appreciate clear organization
Repository management = Professional communication
Your GitHub profile is your public portfolio. Repositories are often the first impression for employers.
I've heard countless tech managers say "I've hired people based on their GitHub." Good organization shows
professionalism and attention to detail.
Essential Repository Components
project-name/
βββ README.md β Your repo's front door
βββ LICENSE β Legal foundation
βββ .gitignore β Keep it clean
βββ data/ β Sample data
βββ src/ β Source code
βββ docs/ β Documentation
βββ tests/ β Test files
βββ examples/ β Usage examples
README, LICENSE, .gitignore + organized directories = Professional repository
Every professional repository needs essential components: README for documentation, LICENSE for legal clarity,
.gitignore to keep things clean, and proper directory structure to organize your work. We'll dive into each of these.
README.md - Your Repository's Front Door
Must Include:
β
Project title and brief description
β
What problem it solves
β
How to install/use it
β
Basic examples
β
How to contribute (for public projects)
β
Contact information
π Live Examples:
Leaflet |
GDAL |
GeoPandas
README.md is the first thing people see. It's displayed on your repository homepage. A good README should
answer: what is this, why does it exist, how do I use it? Let me show you some excellent examples from
major GIS projects.
README Examples: Good vs Bad
β Bad Example:
# Project 2
My code for class
`python main.py`
Too vague, no context, no explanation
β
Good Example:
# Earthquake Mapper
Interactive Leaflet map visualizing
USGS earthquake data from the past
30 days.
## Features
- Real-time data from USGS API
- Circle markers sized by magnitude
- Popup info for each earthquake
## Installation
```bash
pip install -r requirements.txt
python app.py
```
## Usage
Visit http://localhost:5000
Look at the difference. The bad example tells you nothing. The good example immediately tells you what it
does, why it's useful, how to install it, and how to use it. Which repository would you want to work with?
LICENSE - Legal Foundation
β οΈ Without a license = All Rights Reserved
Nobody can legally use, modify, or distribute (even if public!)
Common Choices:
MIT - Permissive, minimal restrictions, maximum adoption
GPL v3 - Copyleft, modifications must remain open
Apache 2.0 - Patent protection, enterprise-friendly
π Add via GitHub: choosealicense.com
Without a license, your code is "All Rights Reserved" by defaultβnobody can legally use it! Always add a license.
MIT is great for maximum adoption, GPL ensures derivatives stay open, Apache 2.0 adds patent protection.
We'll demo adding a license via GitHub's interface.
.gitignore - Keep Repositories Clean
What to Ignore:
Operating System Files:
.DS_Store
Thumbs.db
desktop.ini
IDE Configurations:
.vscode/
.idea/
*.swp
Dependencies:
node_modules/
venv/
__pycache__/
Secrets & Configs:
.env
config.local.json
*.key
π Templates: github.com/github/gitignore
.gitignore tells Git which files to ignore. You don't want OS files, IDE configs, dependencies, or secrets
in your repository. GitHub provides templates for every language. We'll use the Python template for our projects.
Professional Directory Structure
spatial-analysis-toolkit/
βββ README.md β Project overview
βββ LICENSE β Legal terms
βββ .gitignore β Ignore patterns
βββ requirements.txt β Python dependencies
βββ src/ β Source code
β βββ __init__.py
β βββ spatial_utils.py
β βββ visualization.py
βββ data/ β Sample data
β βββ README.md β Data documentation
β βββ sample_points.geojson
βββ docs/ β Documentation
β βββ installation.md
β βββ usage.md
βββ tests/ β Unit tests
β βββ test_spatial_utils.py
βββ examples/ β Usage examples
βββ basic_analysis.ipynb
Consistency helps everyone (including future-you)
Organize your repository logically. Source code in src/, data in data/, docs in docs/, tests in tests/,
examples in examples/. This structure is immediately recognizable to other developers.
Markdown Basics for Documentation
Markdown:
# Heading 1
## Heading 2
### Heading 3
**bold** and *italic*
- List item 1
- List item 2
1. Numbered item
2. Another item
[Link text](url)

```python
code block
```
Renders as:
Heading 1
Heading 2
Heading 3
bold and italic
Numbered item Another item
Link text
code block
π Reference: markdownguide.org
Markdown is simple formatting for documentation. Headers with #, bold with **, italic with *, lists with - or 1.,
code blocks with triple backticks. Let's do a live demo creating a README in GitHub.
Writing Effective Documentation
β
Write for beginners
Assume reader knows nothing about your project
β
Explain "why" not just "what"
Context helps understanding
β
Include prerequisites
List required software, libraries, knowledge
β
Show expected output
Screenshots, example results, success indicators
β
Troubleshooting section
Address common issues proactively
β οΈ Keep it updated!
Outdated docs are worse than no docs
Write for someone who knows nothing about your project. Explain why decisions were made. Include prerequisites
and troubleshooting. Most importantly, keep documentation updatedβoutdated docs create more problems than they solve.
Professional Repository Naming
β
Good Names:
spatial-analysis-toolkit
leaflet-earthquake-map
postgis-performance-benchmarks
qgis-plugin-template
β Bad Names:
project2 - Too generic
My GIS Tool - Spaces cause issues
FINAL_PROJECT_REALLY_FINAL - Unprofessional
asdf - Not descriptive
Use lowercase with hyphens: descriptive and specific
Repository names should be lowercase with hyphens, descriptive, and specific. "leaflet-earthquake-map" tells
you exactly what it is. "project2" tells you nothing. Consistent naming shows professionalism.
Writing Clear Commit Messages
β
Good Commit Messages:
Add elevation data processing function
Update README installation steps
Fix coordinate precision bug in distance calculation
Refactor spatial query logic for performance
β Bad Commit Messages:
fixed stuff
wip
asdf
updated files
more changes
π‘ Best Practices:
Present tense: "Add feature" not "Added feature"
Reference issues: "Fix #42" or "Closes #15"
Be specific and descriptive
Clear commit messages tell a story of your project's development. Use present tense, be specific, reference
issues when relevant. "Add elevation processing function" is much better than "fixed stuff."
Branching Strategy
main branch (stable, working code)
β
βββββ feature/add-postgis-support (new functionality)
β
βββββ fix/coordinate-precision (bug fixes)
β
βββββ docs/update-installation (documentation updates)
main = stable, production-ready code
feature/ = new functionality development
fix/ = bug fixes
docs/ = documentation updates
We'll dive deep into branching in Video 4
Keep your main branch stable. Do development work in feature branches. Clear branch naming conventions make
collaboration easier. We'll cover this in much more detail in the next video on collaborative workflows.
Repository Settings & Configuration
π Public vs π Private:
Public for portfolio/open source, Private for proprietary/in-progress
π Description & Topics:
Help people discover your repository
π GitHub Pages:
Host documentation, project websites
π Issue Templates:
Structure for bug reports, feature requests
π€ GitHub Actions:
Automated testing and deployment
π Demo: We'll explore these settings live
Repository settings matter for discoverability and professionalism. Add description and topics so people can
find your work. Consider GitHub Pages for documentation. We'll demo these settings in GitHub.
GitHub as Your GIS Portfolio
π Pin Important Repositories
Show your best work first
π€ Complete Profile
Bio, location, website, social links
π Contribution Graph
Shows consistency and activity
π’ Organizations
Shows collaboration and team experience
π Profile README
Create username/username repo for profile page
π Examples: giswqs |
awesome-profile
Your GitHub profile IS your portfolio. Pin your best repositories, complete your profile, keep active with a
consistent contribution graph. Create a profile README by making a repository with your username. Let me show
you some great examples.
Assignment: M1A3
Create a Professional GIS Repository
β
Proper structure (README, LICENSE, .gitignore, directories)
β
Professional README with all essential components
β
Appropriate license and .gitignore
β
Simple Python GIS script (spatial "Hello World")
β
Clean commit history with good messages
β
Link from GitHub Classroom assignment
π€ Automated Validation:
GitHub Actions will check your repository structure and script execution
M1A3 is your chance to practice everything we've covered. Create a professional repository with proper structure
and documentation. GitHub Actions will validate your work. Think of this as a template for all future projects.
Essential Resources
π Bookmark theseβyou'll use them throughout your career
Here are essential resources. GitHub Docs for platform features. Markdown Guide for formatting. Choose a License
for license selection. Gitignore templates for every language. And examples of excellent READMEs from major GIS projects.
Key Takeaways
β
Repository management = professional communication
β
Four essential files: README, LICENSE, .gitignore, structure
β
Documentation is for others AND future-you
β
Small details create professional impression
β
Your GitHub IS your portfolio
Practice good habits now = portfolio-ready later
Ready for M1A3? Let's build professional repositories!
To wrap up: Repository management is about professional communication. The four essential files are non-negotiable.
Documentation helps others and future-you. Small details matter. Your GitHub is your portfolio. Practice these
habits now, and they'll serve you throughout your career. Ready for M1A3!