Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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.

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #commit
ADD COMMENT
Topic
Name
1+2 =