Usually many code editors today are using a git plugin that you can use. Try to find if there is an intergrated Git versioning system in your code editor. Personally would reccoment for Mac using the Visual Studio Code which has git integrated

Using visual studio code for windows is not recommended best thing is to use another code editor.

Subscribe to #visualstudiocode