Clone, fetch, pull, push, upstream tracking, pull requests, forks, branching workflows and force-push safety.
40 cards · basic cards · AI-written, checked twice. Edit anything.
- What does git clone do?
Show answer
Creates a local copy of a remote repository with all its history
- What does git fetch do?
Show answer
Downloads updates from a remote repository without merging them into your branch
- What does git pull do?
Show answer
Fetches changes from the remote and merges them into the current branch
- What is a remote in git?
Show answer
A reference to a repository hosted on another server that you can sync with
- What is origin?
Show answer
The default remote name for a repository cloned from another server
- What is an upstream branch?
Show answer
A remote branch that a local branch is configured to track for synchronization
- What does git push do?
Show answer
Uploads local commits to a remote repository
- What is a fork?
Show answer
A personal copy of someone else's repository on a hosting service like GitHub
- What is a pull request?
Show answer
A request to merge changes from one branch to another, usually submitted for code review
- What does git remote -v show?
Show answer
Lists all configured remotes with their URLs
- What is a branching workflow?
Show answer
A strategy for organizing feature development and releases using branches
- What does git rebase do?
Show answer
Reapplies commits from one branch on top of another branch's latest commit
- What does force push do?
Show answer
Overwrites remote branch history with your local branch history
- Why is force push dangerous?
Show answer
It can delete commits that other developers have based work on, breaking their branches
- What does git branch -u origin/main do?
Show answer
Sets the upstream tracking branch for the current branch to origin/main