Skip to content

Git hard reset

Hard reset allows you to reset your local branch to the HEAD (your last local commit). This means it discards any uncommitted changes in your local branch.

Hard reset is useful in scenarios where you need to undo changes and start over. For example, you want to start a feature or task from scratch and discard all your uncommitted work.

How to do a hard reset

Follow the steps below to perform a hard reset:

  1. Click Git.
  2. Click Hard reset in the drop-down menu. The Hard reset branch dialog will open.
  3. Click the box next to "I understand that I will lose any uncommitted pipeline changes in this branch."
  4. Click Hard reset to perform the reset. Otherwise, click Cancel to cancel the reset.