1

I'm working on branch "feature-A". As far as I know, all commits done on that branch should be related to feature A.

How should I deal with little changes that aren't related to feature A? For example, fixing a typo, or anything like that.

Do I just commit it to the branch "feature-A"? Do I switch branches to some other and commit it there?

What is the suggested way to deal with it?

Vlop
  • 53
  • 4

1 Answers1

2

I have flagged this as opinion-based, since different people adopt different strategy to deal with this and other scenarii.

Two of the topics you can look for in order to make your own idea about what you can do are rewriting history and stashing. After understanding those (plus other) concepts, you'll be able to ask specific questions here on SO.

Enlico
  • 23,259
  • 6
  • 48
  • 102