1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [git reset](<https://delaparra-services.nl/knowledge-hub/git-reset>)

  

Category: Git commands 

# git reset

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is git reset?

 

git reset: Move the branch pointer backwards in history, optionally changing staged/working-directory state. ` git reset ` moves your branch back to an earlier commit. How it treats your changes depends on the mode. ` --soft ` keeps the changes staged, ` --mixed `, the default, keeps them in your files but unstaged, and ` --hard ` throws them away.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about git reset

  

### How is git reset used in practice?

 

It is useful for undoing local commits before you share them, such as combining your last three commits into one: ` git reset --soft HEAD~3 ` followed by a new commit.

    

### What should you keep in mind with git reset?

 

` git reset --hard ` is one of the few Git commands that can really lose work, because uncommitted changes are deleted. Committed work can usually be recovered through ` git reflog `, which records where your branch pointed before. Never reset commits that are already on a shared branch. Use ` git revert ` there, which undoes a change with a new commit instead of rewriting history.

 

## At a glance

   CategoryGit commands Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Git commands terms

 

- [git push](<https://delaparra-services.nl/knowledge-hub/git-push>) 
- [git rebase](<https://delaparra-services.nl/knowledge-hub/git-rebase>) 
- [git remote](<https://delaparra-services.nl/knowledge-hub/git-remote>) 
- [git restore](<https://delaparra-services.nl/knowledge-hub/git-restore>) 
- [git revert](<https://delaparra-services.nl/knowledge-hub/git-revert>) 
- [git stash](<https://delaparra-services.nl/knowledge-hub/git-stash>)

 

[All terms starting with G](<https://delaparra-services.nl/knowledge-hub#letter-g>)

 

## Skills

 

- ### Git Advanced Workflows

 

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

 [View skill](<https://delaparra-services.nl/skills/git-advanced-workflows>) [Download zip](<https://delaparra-services.nl/skills/git-advanced-workflows/download>) 
- ### Using Git Worktrees

 

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback

 [View skill](<https://delaparra-services.nl/skills/using-git-worktrees>) [Download zip](<https://delaparra-services.nl/skills/using-git-worktrees/download>) 
- ### Conventional Commit

 

'Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.'

 [View skill](<https://delaparra-services.nl/skills/conventional-commit>) [Download zip](<https://delaparra-services.nl/skills/conventional-commit/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/git-reset/skills.zip>)

 

## Manuals

 

- [Git: branches, rebase and merge conflicts](<https://delaparra-services.nl/manuals/git-branches-rebase-en-merge-conflicten>) 
- [Working with Git](<https://delaparra-services.nl/manuals/werken-met-git>)

 

## Related services

 

- [AI code review](<https://delaparra-services.nl/services#service-05>)

When you push your new change, I will review your code, help your agent avoid the same mistake again, and get your app ready for deployment. 
- [Your own coding agent](<https://delaparra-services.nl/services#service-06>)

If you want to use a coding agent, we provide all the infrastructure to help it work efficiently.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/git-reset)
