🌍 Git & Version Control · subject
Git & Version Control Remote Repositories and Collaboration Syllabus
Every chapter and topic of Remote Repositories and Collaboration examined in Git & Version Control — 5 chapters, 20 topics, plus 51 flashcards written against it.
Remote Repositories and Collaboration syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Remote Repositories and Collaboration in Git & Version Control, not a summary of it.
-
Working with Remotes
4 topics- Adding and Inspecting Remotes
- Fetching and Pulling
- Pushing Changes
- Tracking Remote Branches
-
Authentication and Access
4 topics- HTTPS vs SSH Authentication
- Generating and Adding SSH Keys
- Personal Access Tokens
- Credential Managers and Caching
-
The Forking Workflow
3 topics- Forking a Repository
- Keeping a Fork in Sync
- Contributing to Open Source
-
Pull Requests and Merge Requests
5 topics- Anatomy of a Pull Request
- Opening a Pull Request
- Code Review Process
- Merge Methods
- Resolving PR Conflicts
-
Team Collaboration Practices
4 topics- Commit Message Conventions
- Code Review Etiquette
- Protected Branches and Required Reviews
- Issue Tracking and Labels
Remote Repositories and Collaboration flashcards for Git & Version Control
24 of 51 cards from the Remote Repositories and Collaboration deck — real questions with worked answers.
What is a "remote" in Git, and what is the default name given to the remote you cloned from?
A remote is a named reference (a bookmark) to a version of your repository hosted elsewhere (e.g., on GitHub). When you clone a repository, Git automatically names that remote "origin".
Which command adds a new remote named "upstream" pointing to a URL, and what is its general syntax?
git remote add <name> <url>. Example: git remote add upstream https://github.com/original/repo.git
How do you list all configured remotes together with their fetch and push URLs?
git remote -v (the -v/--verbose flag shows the URLs; plain git remote lists only the names).
Which command shows detailed information about a single remote, including its URL, tracked branches, and which local branches are configured to push/pull?
git remote show <name> (e.g., git remote show origin).
How do you rename a remote from "origin" to "github", and how do you delete a remote named "upstream"?
Rename: git remote rename origin github. Delete: git remote remove upstream (or git remote rm upstream).
How do you change the URL of an existing remote named "origin"?
git remote set-url origin <new-url>.
What is the key difference between git fetch and git pull?
git fetch downloads new commits and updates remote-tracking branches but does NOT change your working branch. git pull does a fetch followed by a merge (or rebase) into your current branch, updating your working files.
Express git pull as an equivalent combination of two other commands (default behavior).
git pull origin main is equivalent to: git fetch origin followed by git merge origin/main.
How do you make git pull rebase your local commits on top of the fetched work instead of creating a merge commit?
Use git pull --rebase, or set it permanently with git config pull.rebase true (or globally with --global).
What does the git fetch --prune (or git fetch -p) option do?
It removes any remote-tracking references locally that no longer exist on the remote (i.e., deletes stale remote-tracking branches whose upstream branch was deleted).
What is the general syntax to push a local branch to a remote?
git push <remote> <branch>. Example: git push origin main pushes your local main to origin's main.
What does the -u (or --set-upstream) flag do in git push -u origin main?
It pushes the branch AND sets origin/main as the upstream (tracking) branch, so future git push and git pull can be run without specifying remote and branch.
Why is git push --force dangerous, and what safer alternative should you prefer?
--force overwrites the remote branch history and can destroy commits pushed by others. Prefer --force-with-lease, which refuses to overwrite if the remote has changes you haven't seen locally.
How do you delete a remote branch named "feature-x" on the remote "origin"?
git push origin --delete feature-x (equivalently git push origin :feature-x).
What is a remote-tracking branch, and how is it named?
A remote-tracking branch is a local read-only reference that mirrors the state of a branch on a remote. It is named <remote>/<branch>, e.g., origin/main. You cannot commit to it directly; it updates only via fetch/pull/push.
What does it mean for a local branch to "track" a remote branch (an upstream branch)?
A tracking branch has an associated upstream remote branch. Git then knows where to push/pull by default and can report ahead/behind status (e.g., "Your branch is ahead of origin/main by 2 commits").
How do you set the upstream for an existing local branch already checked out?
git branch --set-upstream-to=origin/main (or the shorthand git branch -u origin/main).
Which command creates a new local branch that tracks a remote branch you fetched but don't yet have locally?
git checkout -b feature origin/feature, or the shorthand git checkout feature (Git auto-creates a tracking branch if the name matches a single remote), or git switch -c feature --track origin/feature.
Compare HTTPS and SSH as the two main protocols for authenticating with a remote Git host.
HTTPS uses a URL like https://github.com/user/repo.git and authenticates with a username plus a password/token; it works through most firewalls and needs no key setup. SSH uses git@github.com:user/repo.git and authenticates with a public/private key pair; no password prompt per push once keys are set up.
What does a typical SSH remote URL look like versus an HTTPS remote URL for GitHub?
SSH: git@github.com:user/repo.git. HTTPS: https://github.com/user/repo.git.
Since August 2021, why can you no longer use your account password for Git operations over HTTPS on GitHub?
GitHub removed password authentication for Git operations. Over HTTPS you must use a Personal Access Token (PAT) in place of the password; SSH keys are the alternative.
Which command generates a new modern (Ed25519) SSH key pair, and what two files does it produce?
ssh-keygen -t ed25519 -C "your_email@example.com". It produces a private key (e.g., ~/.ssh/id_ed25519) and a public key (~/.ssh/id_ed25519.pub).
When adding an SSH key to GitHub, which of the two key files do you upload, and why never the other?
You upload the PUBLIC key (the .pub file). The private key must NEVER be shared or uploaded; it stays on your machine and proves your identity.
What is the purpose of the ssh-agent, and how do you add your key to it?
ssh-agent holds your decrypted private key in memory so you don't retype the passphrase each time. Start it (eval "$(ssh-agent -s)") then add the key with ssh-add ~/.ssh/id_ed25519.
Planning Remote Repositories and Collaboration for Git & Version Control
Remote Repositories and Collaboration is about 16% of the Git & Version Control syllabus by topic count — 20 of 127 topics, spread over 5 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 15 hours.
The heaviest chapters are Pull Requests and Merge Requests (5 topics), Working with Remotes (4 topics), Authentication and Access (4 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
Remote Repositories and Collaboration (Git & Version Control) FAQ
What is in the Git & Version Control Remote Repositories and Collaboration syllabus?
Remote Repositories and Collaboration is split into 5 chapters — Working with Remotes, Authentication and Access, The Forking Workflow, Pull Requests and Merge Requests and Team Collaboration Practices, containing 20 topics and 0 sub-topics in total.
How many chapters are there in Remote Repositories and Collaboration for Git & Version Control?
5 chapters. Remote Repositories and Collaboration accounts for about 16% of the topics in the whole Git & Version Control syllabus (20 of 127).
How long should I spend on Remote Repositories and Collaboration for Git & Version Control?
Budget around 15 hours for a first pass through Remote Repositories and Collaboration — about 45 minutes per topic plus 12 minutes per sub-topic across its 20 topics. Add revision cycles on top.
Are there flashcards for Git & Version Control Remote Repositories and Collaboration?
Yes — a 51-card Remote Repositories and Collaboration deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.