Commit -m is not taken into account.

huangapple go评论48阅读模式
英文:

Commit -m is not taken into account

问题

当我发送提交版本的命令时,没有任何反应。

$ git status

On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

$ git commit -m "Ajout de la fonction get_soup_file "

On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

为什么提交命令没有被执行?

英文:

When I send the command to commit a version, nothing happens.

$ git status

On branch main
Your branch is up to date with `'origin/main'`.

nothing to commit, working tree clean

$ git commit -m "Ajout de la fonction get_soup_file "

On branch main
Your branch is up to date with `'origin/main'`.

nothing to commit, working tree clean

Why is the commit command not taken into account?

答案1

得分: 1

你还没有添加任何更改以推送到远程位置。当你执行

git status

你会看到一些红色的文件名。这些文件需要被“添加”到一个提交中。

使用:

git add 你想要推送的文件名

然后你应该能够执行 git commit -m "提交描述"

提交基本上是当你对代码进行了满意的更改,想要将这些更改推送到远程位置时执行的操作。

英文:

You haven't added any changes to be pushed into the remote location.
When you do a

> git status

you will see some red file names. These need to be 'added' to a commit.

Use:

>git add nameOfFilesYouWantToPush

Then you should be able to do git commit -m "CommitDescription".

Commits are basically when you made changes to your code that you are happy with, and you want to push up those changes into the remote location.

答案2

得分: 0

你还没有采取任何行动来进行提交。也就是说,您需要首先使用git add命令来暂存您的更改。但是,为了能够使用git add命令,您还需要进行一些更改并保存这些更改。这样,当您运行git status时,您将看到您已经修改了一些文件。

英文:

You have not made anything possible to commit. That is, you need to first stage your changes using the git add command. But, in order to be able to use the git add command, you also need to have done some changes and save your changes. This way, when you do git status, you will see that you have modified some files.

huangapple
  • 本文由 发表于 2023年4月6日 23:50:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75951435.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定