Visual studio git commands

Viewed 112

I am using Visual Studio git for some time and trying to work with git commands now

I am wondering what are the underlying git commands for the below commands in Visual Studio

Git Commands in visual Studio

Does anyone have any idea of what the underlying commands are?

Let's say I want to commit with the message, I am trying

git commit -a "sample message"

However, it is throwing an error saying that my branch is ahead of the master branch by 4 commits.

But if I click on Commit All, it is committing. What am I missing?

1 Answers

Try to use 2 commands.

1. git add .
2. git commit -m "sample message"

So, you wrote some your code, then you need to execute command: " git add . " - stages your changes to the "temporary storage" before do commit. Then, you can do simple commit via: " git commit -m "sample message" ". And it is done.

Best regards

Related