Git Aliases Unstage staged files

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Normally, to remove files that are staged to be committed using the git reset commit, reset has a lot of functions depending on the arguments provided to it. To completely unstage all files staged, we can make use of git aliases to create a new alias that uses reset but now we do not need to remember to provide the correct arguments to reset.

git config --global alias.unstage "reset --"

Now, any time you want to unstage stages files, type git unstage and you are good to go.



Got any Git Question?