Did you know? Research improves critical thinking skills.

Git Interview Questions

Git Interview Questions and Answers

Git Interview Questions and Answers

1. What is Git?
Git is a distributed version control system used to track code changes.
2. Difference between Git and GitHub?
Git is a tool, GitHub is a hosting platform for Git repositories.
3. What is a repository?
A repository is a storage for project files and their history.
4. What is a commit?
A commit is a snapshot of changes saved in Git.
5. What is a branch?
A branch is a separate line of development.
6. What is merge?
Merge combines one branch into another.
7. What is clone?
Clone copies a remote repository to local machine.
8. What is pull?
Pull fetches and merges code from remote repository.
9. What is push?
Push uploads local commits to remote repository.
10. What is staging area?
Temporary area before committing files.
11. What is HEAD?
HEAD points to the current branch/commit.
12. What is conflict?
Occurs when two branches modify the same line.
13. How to resolve conflict?
Edit file manually, remove markers, commit again.
14. What is git fetch?
Downloads changes without merging.
15. Difference between fetch and pull?
Fetch only downloads, pull downloads and merges.
16. What is rebase?
Moves commits to a new base commit.
17. What is stash?
Temporarily saves uncommitted changes.
18. What is tag?
Marks a specific commit as a version.
19. What is .gitignore?
File to ignore certain files from Git tracking.
20. What is Git workflow?
Defined process of using branches and merges.


Source: sureshtechlabs.com


Share this post:

WhatsApp Facebook Twitter Telegram