DEV Community

Tadas Paplauskas
Tadas Paplauskas

Posted on

TL;DR: How to reset a single file in git branch

Example scenario: You updated JS dependencies, but it somehow broke your build. You would prefer not to bother with that in the current branch, so you decide to reset dependencies to the develop branch version.

  1. git checkout feature/my-feature-branch
  2. git checkout develop -- bun.lockb
  3. git add .
  4. git commit -m "nevermind"
  5. git push

Top comments (0)