I
I
Ilya V.2022-03-22 09:14:21
git
Ilya V., 2022-03-22 09:14:21

What type of commit will be (fix: or feat:) if the feature was not implemented in one stage?

I am learning Git.
I got to the commit theme feat: , fix: etc.
====
Let's say I have created a branch in which I have to implement a + b = c; return c;

-Question: what if a feature is not fully implemented in one commit?
For example:
1) During the first stage, I managed to write the code a + b, then the commit is conditionally like this:
"feat (sum): sum 'a' + 'b' "

It turns out that I did not have time to implement all the functionality in this branch.
- Question: in this case, the improvement of the functionality - is it the addition of a new feature or is it a bug fix?
That is:
2) I finish the second stage return c.
-Question: am I writing a feat again, since it's a new feature, or am I fixing a bug and writing a fix, since the feature doesn't work as it was originally planned?
"feat(sum): return result of sum 'a' + 'b' "
or
"fix(sum): return result of sum 'a' + 'b' "

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2022-03-22
@FieRZe

You can squash and get one out of two commits - the question is removed.
But in general, this is definitely not a fix. A fix is ​​not a planned edit.
That is, with the current approach, it will be a feature such and such, a desk van, and a feature such and such a desk that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question