Does git provide a REST API for fetching the output of the gits status command. I looked up the https://developer.github.com/v3/ but couldn't find what I am looking for. I want to get all the text output that gets displayed when we type in the git status command in the command prompt/git bash terminal and then be able to display that output on a webpage /application window.
1 Answer
Server repositories are bare, they don't have the working directory. And in a bare repository (even local) git status is meaningless (because it compares the repository with the working tree) and produces error:
fatal: This operation must be run in a work tree
Hence there is no API for getting status.
3 Comments
Asif Kamran Malick
I had just rephrased my question.Thank you for clarifying it
phd
It's a completely different question now. IMO it would be better if you restore the original question and ask a different question separately. Or my answer looks stupid and irrelevant.
Asif Kamran Malick
rolled back. but I guess people would have still been able to go through the original question , thanks to stackoverflow's history feature.
gitexecutable on your local machine; none of that (or very very little perhaps) is done via the GitHub API. Hope that makes sense.