What is the difference between git stash apply and git stash pop?

Heisenbug logo
TheHeisenBug

Search

Search across questions, learning content, and hands-on projects

Ace Your Next Tech Interview

5,986+ interview questions across 87 technologies — with expert answers, advanced search, AI-powered assistance, personal highlights, structured learning paths, and hands-on practice projects.

5,986+Questions & Answers
87Technologies
AdvancedSearch
Built-inAsk AI
PersonalHighlights
StructuredLearning Paths
Hands-onPractice Projects

Lifetime Access

One-time payment. No subscriptions. Unlock everything, forever.

$19.90USD

or R$49.90 BRL

FeatureFreePremium
Question titlesAllAll
Answers per topicTop 5All
Learning chaptersFirst 5All
Practice projectsFirst 3All
Highlights
Ask AI
Read tracking
Search

Git Interview Questions

  1. [JUNIOR] What is Git and why is it used?
  2. [JUNIOR] What is a commit in Git?
  3. [MID] What is the difference between git fetch and git pull?
  4. [MID] What is the difference between git merge and git rebase, and when would you use each?
  5. [MID] What is a merge conflict in Git and how do you resolve it?
  6. [JUNIOR] What is the difference between Git and GitHub?
  7. [JUNIOR] What is a repository in Git?
  8. [JUNIOR] What is the purpose of the .gitignore file?
  9. [JUNIOR] What is branching in Git and why is it important?
  10. [JUNIOR] What are the differences between the working directory, staging area, and repository in Git?
  11. [MID] What is git stash and when would you use it?
  12. [MID] What is the difference between git reset and git revert?
  13. [MID] What is a pull request and how does it fit into a Git workflow?
  14. [JUNIOR] What is a version control system and what problem does it solve?
  15. [JUNIOR] What is the HEAD in Git?
  16. [JUNIOR] What does the git clone command do?
  17. [JUNIOR] What does the git push command do?
  18. [JUNIOR] What does the git pull command do?
  19. [MID] How do you revert a commit that has already been pushed and made public?
  20. [MID] What is the purpose of the git cherry-pick command?
  21. [MID] How do you squash multiple commits into one using interactive rebase?
  22. [MID] How would you undo the last commit while keeping the changes in the working directory?
  23. [SENIOR] What are Git hooks and how would you use them to automate workflows?
  24. [SENIOR] How do you use git bisect to find the commit that introduced a bug?
  25. [SENIOR] How would you handle accidentally committing sensitive information to a public repository?
  26. [JUNIOR] What are the advantages of using Git over other version control systems?
  27. [JUNIOR] What does the git add command do and what is the staging area?
  28. [JUNIOR] What is the purpose of a commit message and what makes a good one?
  29. [MID] What is a detached HEAD state and how do you get out of it?
  30. [MID] What is the difference between a fast-forward merge and a three-way merge?
  31. [MID] What is git blame and when would you use it?
  32. [MID] What is the Git flow branching model?
  33. [MID] What is the difference between git reflog and git log?
  34. [SENIOR] What are Git submodules and when would you use them?
  35. [SENIOR] How do you handle large files in Git using Git LFS?
  36. [SENIOR] What techniques do you use to keep your Git history clean and meaningful?
  37. [SENIOR] How would you implement a hotfix for a critical production bug while a major feature is in development?
  38. [JUNIOR] What does the git status command show?
  39. [JUNIOR] What is the difference between git init and git clone?
  40. [JUNIOR] What does the git diff command do?
  41. [MID] What is the difference between git stash apply and git stash pop?
  42. [MID] How do you delete a remote branch in Git?
  43. [MID] How do you remove a file from Git tracking without deleting it from the filesystem?
  44. [MID] How do you recover a branch that was accidentally deleted?
  45. [MID] How do you create and manage tags in Git?
  46. [SENIOR] What is a bare repository in Git and when would you use it?
  47. [SENIOR] How do you keep a forked repository up to date with the upstream repository?
  48. [SENIOR] What strategies would you use to manage a large monorepo with many collaborators?
  49. [SENIOR] How do you use git merge strategies like ours or theirs?
  50. [EXPERT] How does Git store data internally using blobs, trees, commits, and tags?
  51. [EXPERT] What is the Git reflog and how can it be used to recover from data loss scenarios?
  52. [JUNIOR] What is a Git commit hash and how is it generated?
  53. [MID] How do you rename a branch in Git?
  54. [MID] What is the difference between git rm and simply deleting a file from the filesystem?
  55. [SENIOR] What is git worktree and when would you use it?
  56. [SENIOR] How would you structure commits for a large refactoring task spanning multiple files?
  57. [SENIOR] How do you clean up local branches that have been merged into the main branch?
  58. [EXPERT] What is git gc and when would you use it?
  59. [EXPERT] How do you enforce Git hooks across a team when client-side hooks are not version-controlled by default?
  60. [JUNIOR] How do you create an alias in Git?
  61. [SENIOR] How would you migrate a repository from SVN to Git while preserving history?
  62. [EXPERT] How do you manage large binary files in Git without using Git LFS?
  63. [EXPERT] How do you apply patches across repositories using git format-patch and git am?
  64. [EXPERT] How does Git's packfile format work and what triggers repacking?
  65. [EXPERT] What are the internals of Git's three-way merge algorithm and how does it detect conflicts?