1

I made a branch for a particular feature. And I had to fix some bugs and forgot I was in that branch. Now I want to push those files with bugs fixed to the master branch and leave the files related to the feature alone in the branch. What should I do?

Joshua Leung
  • 2,219
  • 7
  • 29
  • 52

1 Answers1

0

You can do this by "stashing" your changes. This allows you to store your changes (without a commit), change branches, and then pop them out.

git stash
git checkout the_other_branch
git stash pop

Once this is done, you can continue editing or commit them as normal.

Jacobm001
  • 4,431
  • 4
  • 30
  • 51