我在本地创建了一个目录:
每个文件都是逐步修改的。我还创建了补丁,如下所示:
我尝试了以下命令:
我遇到了以下错误:
仓库在这里起到了什么作用?我是否需要先维护一个代码仓库?
编辑:根据下面的评论,我们需要一个仓库来进行第一步操作:
1. 在Github上创建一个空仓库:"MyRepo" 2. 在本地机器上克隆它(使用git clone命令) 3. 然后将第一个文件"hello_world.c"添加到目录/MyRepo中 4. 然后执行命令:git add hello_world.c 5. 然后执行命令:git commit -m 'My First source' 6. 然后执行命令:git push -u origin master 7. 之后,我输入了以下命令:git send-email --to=abc@xyz.org --subject="[asdasdas] assd asdasd" hello_world.c 现在我遇到了一个错误:
/home/Tegra。
我在/home/Tegra中创建了以下文件:hello_world.c hello_world_1.c hello_world_2.c
每个文件都是逐步修改的。我还创建了补丁,如下所示:
diff -u hello_world.c hello_world_1.c > hello_world_1.patch
diff -u hello_world_1.c hello_world_2.c > hello_world_2.patch
- 现在,我想首先使用 git send-email 发送一封邮件到邮箱地址 abc@xyz.org,该邮件应包含 hello_world.c 文件。
- 然后,我想发送第二封邮件,附件为 hello_world_1.patch 文件。
- 然后,我想发送第三封邮件,附件为 hello_world_2.patch 文件。
我尝试了以下命令:
git send-email --to abc@xyz.org --subject My Hello hello_world.c
我遇到了以下错误:
Cannot run git format-patch from outside a repository
仓库在这里起到了什么作用?我是否需要先维护一个代码仓库?
编辑:根据下面的评论,我们需要一个仓库来进行第一步操作:
1. 在Github上创建一个空仓库:"MyRepo" 2. 在本地机器上克隆它(使用git clone命令) 3. 然后将第一个文件"hello_world.c"添加到目录/MyRepo中 4. 然后执行命令:git add hello_world.c 5. 然后执行命令:git commit -m 'My First source' 6. 然后执行命令:git push -u origin master 7. 之后,我输入了以下命令:git send-email --to=abc@xyz.org --subject="[asdasdas] assd asdasd" hello_world.c 现在我遇到了一个错误:
No subject line in hello_world.c ? at /usr/lib/git-core/git-send-email line 584