19

In Visual Studio Code, there is a "Show Git Output" menu item that shows the recent Git commands that have been run. For an example of what this looks like, see 3:35+ in this video.

Is there a way to do the same in Visual Studio?

Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
foluis
  • 988
  • 2
  • 10
  • 23
  • Wouldn't a basic Git tutorial be more useful? – ceejayoz Jan 21 '17 at 03:41
  • 1
    Maybe, but for example the Git tools in VS have Sync option, this operation does not exist on Git. This operation as I know execute two commands Git Pull and git push, one after other. The maybe some other cases. – foluis Jan 21 '17 at 03:44
  • http://stackoverflow.com/questions/30038999/differences-between-commit-commit-and-push-commit-and-sync says "Commit and Sync does three things. First, it will commit. Second, it will perform a pull (grabs the updated information from the remote repo). Finally, it will push." It's just a series of commands that MS gave a name to. – ceejayoz Jan 21 '17 at 03:46
  • Other example for instance is what command does VS pass to Git when you move a file to other folder in the solution explorer and then commits changes? and so on – foluis Jan 21 '17 at 03:49
  • Again, a basic Git tutorial would answer all these questions. https://git-scm.com/docs/git-mv for moving files, followed by a https://git-scm.com/docs/git-commit to commit the change. – ceejayoz Jan 21 '17 at 03:50
  • 1
    you are making my point. Which parameter uses VS to accomplish this from all of them? I know how to do it I know the git basics. The question is not how to do it, but which command uses VS and if there is a way to intercept them. I think VS Code has that functionality – foluis Jan 21 '17 at 03:59
  • It's not using a special magic parameter. It's doing three basic Git operations in sequence. Just like if you build a batch file, or run them manually from the command line. – ceejayoz Jan 21 '17 at 04:09
  • @foluis You might be looking for something like https://msdn.microsoft.com/en-us/library/bb166568.aspx and [this](https://social.msdn.microsoft.com/Forums/vstudio/en-US/aa62e92f-5573-420f-b03c-a7016624edf3/how-to-intercept-the-visual-studio-command-execution-event-of-project-buildrebuild?forum=vsx) might be useful as well. – Naman Jan 21 '17 at 04:12
  • 1
    Please note that Git is version control software, and GitHub is an online web service that uses Git; they are not the same thing. I've [edited](//stackoverflow.com/help/editing) your question to remove the [tag:github] tag. In addition, it is best to not have your question rely on external sources, so I added a description so that your question will remain understandable even without the video you linked to. – Scott Weldon Jan 21 '17 at 08:23

1 Answers1

2

This is not entirely possible (for instance, for VS2015) because:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250