1

I want to execute specific Git command, let's say:

git commit --amend ...
  1. Is it possible to execute somehow within GitHub.com (if I don't have an installed git on my pc)? Is there a "web-based" terminal/console window somewhere?

  2. Is it possible to execute commands directly on repository without downloading that repo on pc?

meager
  • 209,754
  • 38
  • 307
  • 315
T.Todua
  • 44,747
  • 17
  • 195
  • 185
  • You can do a lot of thing with Github, but you cannot run arbitrary Git commands against your repository. Asking for a different tool that does this for you is off topic for Stack Overflow. – meager Sep 24 '18 at 17:57

1 Answers1

2

1) Yes and no. GitHub executes those commands for you behind the scenes. So yes, you can execute the commands, just indirectly. For instance, if you approve a pull request, GitHub executes some form of git pull on the repo for you. No, you don't need git on your machine because GitHub is using git that is installed on their servers.

2) No, not directly.

Tyler Marshall
  • 478
  • 2
  • 9
  • 1) how can i do that? – T.Todua Sep 24 '18 at 17:01
  • 1
    How can you do what? If you are talking about the `git pull`, first you have to make sure you have permissions on the repo (can you modify the repo?). Next, you gotta actually make the pull request. Pull requests are when you are on a different branch. You can branch and then edit a file on GitHub. Create branch by clicking branch and enter new branch name. Edit a file by using the pencil icon while looking at a file. Create the commit by saving the edits. Create the pull request by clicking "new pull request" next to branch. Approve the pull request by going to pull requests tab. – Tyler Marshall Sep 24 '18 at 17:17
  • 1
    Note that behind the scenes, GitHub is doing a `git checkout -b new_branch`, `git add -A`, `git commit -s -m "my commit message"`, and finally `git pull`. Note that a creating pull request is not a git command because it is something that is not part of git itself. You are asking someone who has repo access to do a `git pull`. – Tyler Marshall Sep 24 '18 at 17:21
  • thanks, i meant How can i execute git commands online, without using PC software (like GitHub desktopclient, tortoiseGit...).. I don't know if you dont understand my main question, so again an example - i want to execute ` `git commit ammend..` - can i do that online with GitHub (is there a web-based terminal/window?) – T.Todua Sep 24 '18 at 17:53
  • There is no web terminal. I also see you asking about git amend. If you want to edit a commit that has already been pushed, [it is not recommended to do so.](https://stackoverflow.com/questions/457379/how-do-i-edit-an-incorrect-commit-message-in-git-that-ive-pushed) – Tyler Marshall Sep 24 '18 at 19:01