1

I used to work with GIT and now I cannot find the solution to my specific problem:

When I create branch from master with git checkout -b for example "feature/my-branch" and I do local changes on that branch, checking out master will clear that changes and bring back clean master branch. Another git checkout feature/my-branch will bring back local changes.

From today this does not work. This was like autoStash function.

How can I re-enable this?

Edit1: Now when I checkout master from my feature branch, the changes are kept and not discarded (or stashed).

  • You must *commit*. Stuff you have not committed is *not in Git* (it is in your working tree, but that's a temporary area). – torek Aug 25 '21 at 21:01

1 Answers1

1

I think if you make changes to "my_branch" you should commit the changes before they take place, otherwise git is not aware of those changes. To see those changes in the original master branch, you should merge them.

You can also check this link: https://stackoverflow.com/a/47476040/3924875

commet
  • 11
  • 1