Answers for "git how to not commit but keep changes"

0

git how to not commit but keep changes

You can use git stash, which will save your changes without creating a commit.1

First, stash your changes:

$ git stash
Then switch to your other branch:

$ git checkout branch-B
When you're ready, go back to your original branch and unstash your changes:

$ git checkout branch-A
$ git stash pop
See the documentation linked above for more details and specifics on additional use cases.
Posted by: Guest on April-27-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language