Welcome to the INP GitHub intro. By the end of this page you will have made a real contribution to a real repository: a photo of yourself, merged into this repo by you. No one has to approve it. A bot checks your change and merges it for you, usually within a minute.
Then your face shows up in the collage at the bottom of this page.
- Create a GitHub account: github.com/join
- Install git for your operating system: installation guide
- Create a personal access token: how to. When git asks you for a password, paste the token instead. Your GitHub account password will not work.
| Command | What it does |
|---|---|
git clone <url> |
Download a copy of a repository onto your computer |
git status |
Show which files you have changed |
git add -A |
Stage all your changes, so git knows what to save |
git commit -m "message" |
Save the staged changes, with a note about why |
git push |
Send your saved changes up to GitHub |
git pull |
Bring down changes other people made |
That is genuinely most of what daily git looks like. For everything else, keep this cheat sheet open.
A fork is your own copy of someone else's repository. You can do whatever you like in your fork without affecting the original.
Click Fork at the top right of this page, then Create fork.
Cloning downloads your fork onto your laptop. On your fork's page (the URL should have your username in it), click the green Code button and copy the HTTPS URL.
Then in a terminal:
git clone https://github.com/YOUR-USERNAME/INP_Git_Intro.git
cd INP_Git_IntroCheck you cloned the right one before going further. This is the single most common thing to get wrong, and it is much easier to catch now than after you have made your commit:
git remote -vBoth lines must contain your GitHub username. If they say josueortc, you
cloned this repository rather than your fork — see
Permission denied when pushing at the bottom.
It is a one-line fix and you will not lose any work.
Put one photo of yourself into the photos/ folder. The filename matters,
because the bot uses it to label your photo in the collage:
photos/Firstname_Lastname.jpg
For example, photos/Ada_Lovelace.jpg. Rules:
- One photo, directly inside
photos/— not in a subfolder - Named
Firstname_Lastnamewith a single underscore between the two names - Ending in
.jpg,.jpeg, or.png - Smaller than 5 MB
- Change nothing else in the repository
git statusYou should see your photo listed as an untracked file. If you see other files listed too, the bot will not merge your change, so undo those first.
git add -A
git commit -m "Add photo of Firstname Lastname"
git pushA pull request asks a repository to take your changes. Go to your fork on GitHub and click Contribute, then Open pull request.
Check the boxes at the top of the page before you submit. The left one (
base repository) must sayjosueortc/INP_Git_Intro. If it says anything else, click it and pickjosueortc/INP_Git_Introfrom the list. This repository has relatives on GitHub, and the page sometimes guesses the wrong one.
Click Create pull request.
Within about a minute a bot will check your pull request. If you followed the rules above, it merges your photo and says so in a comment. You are done — you have contributed to a shared repository.
If something was off, the bot comments explaining exactly what, and leaves your
pull request open. Fix it on your laptop, then git add -A, git commit, and
git push again. The bot rechecks every time you push. Nothing is broken and
nothing is lost.
It only merges pull requests that do nothing except add new photos. The usual reasons it declines:
| Bot says | What happened | Fix |
|---|---|---|
| Not a new file | You edited or replaced an existing photo | Use a filename nobody has used yet |
| Wrong folder | Your photo is not directly inside photos/ |
Move it to photos/Firstname_Lastname.jpg |
| Bad filename | Missing the underscore, has spaces, or the wrong extension | Rename to Firstname_Lastname.jpg |
| Too large | The photo is over 5 MB | Export a smaller version |
| Other files changed | You also changed the README, workflows, or anything else | Undo those changes and push again |
None of these are a problem, and asking for help is not cheating. That is what the workshop is for.
If git push fails with something like:
remote: Permission to josueortc/INP_Git_Intro.git denied to your-username.
fatal: unable to access '...': The requested URL returned error: 403
you cloned this repository instead of your own fork. Nobody but the instructor can push here, which is the whole reason you fork first: the fork is yours to push to, and the pull request is how you offer it back.
Your commit is safe. Point the repository at your fork and push again:
# 1. Make sure you have a fork. Click Fork at the top of this page if not.
# 2. Check what you are currently pointed at.
git remote -v
# 3. Repoint it at your fork, using your own username.
git remote set-url origin https://github.com/YOUR-USERNAME/INP_Git_Intro.git
# 4. Confirm it changed, then push.
git remote -v
git push -u origin HEADThen continue from step 6 and open your pull request.
If instead you see Support for password authentication was removed or you are
asked for a username and password over and over, the repository is fine but your
credentials are not. Your GitHub account password will not work; you need a
personal access token
pasted in place of the password. The
GitHub CLI handles this for you if you would rather
not manage tokens:
gh auth loginThis rebuilds itself every time a photo is merged. Refresh the page a minute after your pull request goes in and look for yourself.
Last year's cohort:
Setup and maintenance notes live in INSTRUCTOR.md.






