Git Stash

Vanza Setia,

Estimated reading time: 1 minute

Problem

You want to run git rebase command, but you still have unstaged changes. You get the following error after executing git rebase -i 70d0caa:

error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.

You do not want to commit the changes yet. How can you solve this?

Solution

You solve the problem with git stash.

Excute git stash. This command will stash all your unstaged changes. Then, you can run git rebase. After the rebase is done, execute git stash pop to get back all the unstaged changes.

Share your thoughts

Topic(s).

Thank you for reading this Git Stash. You can subscribe to all my articles with the Articles RSS. If you have a positive or negative comment, please send me an email or contact me through one of my social media accounts.

Share with your network

Copy this link and send it to great people only.

https://vanzasetia.xyz/blog/git-stash/

For you

  • No JavaScript

    This notice aims to help both the webmaster and the user to understand the meaning of a website without JavaScript.

    By Vanza Setia

    notice

  • Read This before You Go Crazy

    Warning: Reader discretion is advised. This article contains disturbing content.

    By Vanza Setia

    stupidity