I assume you mean github, rather than git? It's not reliant on the colors. The "Code" and "New Pull Request" buttons are green, but they also have text on them. Various icons also have assistive text.
There are quite a few variations of color blindness, so ultimately you want color to just be a hint. Handling the most common case is a partial fix.