Inno 3.2 Version Control Flashcards
(45 cards)
What is a repository in Git?
A repository (repo) is a storage space for your project’s code, including all its history, branches, and commits.
What is a commit in Git?
A: A commit is a snapshot of changes in your codebase. It records what was changed, when, and by whom.
SNAPSHOT OF CHANGES
Q: What is a branch in Git?
A: A branch is an independent line of development, allowing you to work on features or fixes without affecting the main codebase.
Q: What is a merge in Git?
A: Merging combines changes from one branch into another, usually integrating a feature branch back into the main branch.
Q: What is a merge conflict?
A: A conflict occurs when Git can’t automatically combine changes from two branches — manual resolution is needed.
Q: What does it mean to clone a repository?
A: Cloning creates a local copy of a remote repository so you can work with it on your machine.
Q: What does pull do in Git?
A: git pull fetches and integrates changes from a remote repository into your current local branch.
Q: What does push do in Git?
A: git push sends your local commits to a remote repository.
Q: What does fetch do in Git?
A: git fetch retrieves the latest commits from the remote but does not merge them into your local branch automatically.
RETRIVES THE LAST COMMITS BUT DOES NOT MERGES IT AUTOMATICLLY
Q: What does git init do?
A: It initializes a new Git repository in your current folder.
Q: What does git clone do?
A: It creates a local copy of an existing remote repository.
Q: What does git add do?
A: It stages changes, preparing them to be committed.
Q: What does git commit do?
A: It saves the staged changes to the local repository with a message.
Q: What does git log show?
A: It displays the commit history of the current branch.
Q: What does git branch do?
A: It lists, creates, or deletes branches.
Q: What does git checkout do?
A: It switches between branches or restores files.
Q: What does git merge do?
A: It integrates changes from one branch into the current branch.
Q: What does git remote do?
A: It manages connections to remote repositories.
Q: What does git push do?
A: It uploads your local commits to the remote repository.
Q: What is the Git Flow branching model?
A: It uses branches like main, develop, feature/, and hotfix/ to manage release cycles and environments.
Q: What is Trunk-Based Development?
A: All developers work on a single main branch with short-lived feature branches — encourages CI and fast delivery.
EVERYONE WORKS ON SINGLE BRANCH WITH SHORT LIVED FEATURE BRANCH
Q: What are SSH keys in Git?
A: SSH keys authenticate you securely with remote Git servers without using a password every time.
Q: How is access control typically handled in Git repositories?
A: With roles (e.g., read, write, admin) on platforms like GitHub/GitLab, often combined with branch protection rules.
Q: What is rebasing in Git?
A: Rebasing moves or combines commits from one branch onto another to create a cleaner history.