The DevOps DropSign in
Interview HubTopicsCertification PrepSavedAchievementsGlobal LeaderboardLearnTech BlogsTech News

Career

Roles, levels, interviews and how to grow into them.

TypeEverythingQuestions4Drills1Blogs4News1
LevelAll levelsBeginner2Advanced1Expert1

2 items at beginner level · all topics

  • QuestionDevOps·beginner·4 min+10 XP

    Your branch is 5 commits behind main and you have uncommitted changes. How do you update safely?

    Save the uncommitted work first with a stash or a WIP commit, then fetch and rebase onto origin/main, then bring it back. The real point is knowing what git pull would do to your branch before you run it.

    #Git#Version Control#Best Practices
  • QuestionDevOps·beginner·4 min+10 XP

    You made a commit but forgot to include one file, and it isn't pushed yet. What do you do?

    Stage the file and run `git commit --amend`. Amend doesn't edit the previous commit, it replaces it with a new one that has a new SHA, which is free while the commit is still local and a problem the moment someone else has it.

    #Git#Version Control#Best Practices