Using code from github for own thesis
Assuming the license on the code permits it there's nothing wrong with using open source code in your thesis. If the license is an open-source style license which allows derivative works you don't even need to contact the author for permission though it may be polite to do so. 

How it should be cited depends on the citations style your thesis is to be written with but has come up before on the site. 

How do you cite a Github repository?

In general you're golden as long as you make it extremely clear that your work is an extension of existing code and make it extremely clear what the source is. If this is central to your thesis then I'd mention it prominently in the text rather than simply listing it as a citation. 

If it's academic/scientific code there may be documentation on the authors site specifying what publication should be cited in relation to the code . 

If you want to show exactly what you've done yourself you can generate a file listing all the changed/added/removed lines which you can attach as an appendix. 

I did almost exactly this as part of my MSc: taking an open source tool and adding extra functionality to it then publishing it with changes. 

Edit: if there's no license then you'll need to get in contact with the author somehow. This may help.
https://stackoverflow.com/a/12687679/3535153