Implementation of itoa
The code almost works.
To make it work in all cases, test the program with Valgrind, which detects undefined behavior because of invalid memory access. This will prove that the buffer needs to be 11 bytes long, not only 10.
What about platforms where int has 64 bits instead of just 32? For these you need a larger buffer. Until then, you should use a compile-time assertion (static_assert) to ensure this implicit assumption.
What about negative numbers? -6 is a valid integer as well, and it should be converted appropriately.
If this function is the bottleneck of your whole program because it is too slow, have a look at how the Go programming language converts integers to strings. It's in the strconv package and uses lots of nice tricks to cut down the number of integer divisions, since that's the most expensive machine instruction in your code.
You can get rid of the get_digits function if you have the end of the string at a fixed address. Start with:
char *p = buf + sizeof buf - 1;
*p = '\0';

and then continue to fill the buffer from right to left by doing *(--p) = '0' + digit. At the end just return p, which will point to the first digit.
The return type should be const char * instead of char * since the caller is not supposed to do anything to the buffer.