This image shows the Git workflow in MATLAB.

As you can see, you will be working in your local directory, which is your Sandbox. From there, you can make changes to your local repository. Then they can be transferred to a remote repository, for example. Github
You can select clone remote git repository or create a new one .
I recommend that you create a new repository in GitHub and then use the clone link to create a local repository from MATLAB. This will clone the empty repository into your working directory. This local copy is called the sandbox. You can start working with these files and modify them. Once you have reached a certain milestone, you can commit the changes to your local repository. This will be ahead of the remote repository (GitHub). You can then drag these commits to the remote repository (or extract other commits that others have added to the remote repository).
After you have added the repository, you first need to register your binaries; Create a gitattributes file in your repository and add the following content;
*.mat -crlf -diff -merge *.p -crlf -diff -merge *.slx -crlf -diff -merge *.mdl -crlf -diff -merge
These lines indicate no attempt to automatically feed lines, differences, and merge attempts for these file types.
You can also check other file types you use, which you also need to register as binary files in order to avoid corruption during registration. Check files such as .mdlp, .slxp, MEX files (.mexa64, .mexmaci64, .mexw32, .mexw64) .xlsx, .jpg, .pdf, .docx, etc. Add a line to the attributes file for each file type that you need;
*.mdlp -crlf -diff -merge *.slxp -crlf -diff -merge *.sldd -crlf -diff -merge *.mexa64 -crlf -diff -merge *.mexw32 -crlf -diff -merge *.mexw64 -crlf -diff -merge *.mexmaci64 -crlf -diff -merge *.xlsx -crlf -diff -merge *.docx -crlf -diff -merge *.pdf -crlf -diff -merge *.jpg -crlf -diff -merge *.png -crlf -diff -merge
You can find more information here: http://www.mathworks.nl/help/matlab/matlab_prog/set-up-git-source-control.html
After that you can mark files for addition and commit in your local repository. If you want, you can also click and extract to the remote repository.
Note that if you want to merge branches, you will need to install the Git command line client if you do not already have one.