diff --git a/pr/primary/docs/how-to-experience.md b/pr/primary/docs/how-to-experience.md deleted file mode 100644 index 8a1be97ead9de589424853f6d18e6468a13a5d37..0000000000000000000000000000000000000000 --- a/pr/primary/docs/how-to-experience.md +++ /dev/null @@ -1,131 +0,0 @@ -# How to experience this practice - - - -## 准备工作 - -1. [注册Gitee账号](https://gitee.com/signup)并设置好**提交邮箱**。 - - 通常,可以在自己个人主页的URL(统一资源定位符,Uniform Resource Locator)中查看**Gitee账号**(即**Gitee ID**),如下例所示: - - ![GiteeID](./images/gitee_id.png "GiteeID") - - - - 可以到“设置 | 邮箱管理”页面中查看自己的**提交邮箱**,如下例所示: - - ![提交邮箱](./images/submission_email.png "提交邮箱") - - - -2. [签署个人CLA](https://clasign.osinfra.cn/sign/Z2l0ZWUlMkZvcGVuZXVsZXI=)。 - - ![签署个人CLA](./images/sign_individual_cla.png "签署个人CLA") - - 注意:签署CLA的邮箱地址应该与Gitee账号关联的**提交邮箱**地址保持一致。 - - - -3. 参考[Git官网](https://git-scm.com/downloads)安装好git工具软件。 - - ![Git工具软件](./images/git_logo@2x.png "Git工具软件") - - 注意:如果您已经有了可以使用Git工具软件的命令行/图形环境(如Linux、macOS等),则可以略过这一步。 - - - -4. 在自己的PC机上配置好git账号,譬如: - - ```shell - git config --global user.name "woodrabbit" # 请设置成您自己的Gitee-ID - git config --global user.email "woodrabbit@qq.com" # 请设置成您自己和Gitee-ID关联的提交邮箱 - git config --global list # 查看设置 - ``` - - - -## 提交PR - -1. 将[此实验的上游仓库](https://gitee.com/openeuler/git-basics)fork到自己的Gitee账号下。 - - ![fork](./images/fork.png "fork") - - - -2. 将自己Gitee账号下的这个远程(remote)仓库“git clone”到本地PC。 - - ```shell - # 注意:请从您自己的远程仓库上下载 - git clone https://gitee.com/woodrabbit/git-basics.git - cd git-basics - git branch - git status # On branch master - ``` - - - -3. 创建自己的新分支。 - - ```shell - git switch -c woodrabbit # 注意:请以自己Gitee-ID为名创建分支 - git branch - git status # On branch woodrabbit - ``` - - - -4. 进入我们这个实验的工作目录并以自己的Gitee-ID为名建立空文件。 - - ```shell - cd ./pr/primary/ # 我们的修改都在这个目录进行,并且注意不要修改该目录下的其他文件 - cd . > woodrabbit # 以此方法建立以自己Gitee-ID为名的空文件 - ``` - - - -5. 将此文件加入git暂存区并提交到本地仓库。 - - ```shell - git add woodrabbit # 把以自己Gitee-ID命名的文件加入git暂存区 - git commit -s -m "Add woodrabbit" # 添加了一个以自己Gitee-ID命名的文件 - ``` - - - -6. 将此提交推送(**push**)到自己的远程仓库。 - - ```shell - git push # 第一次push时,这个命令会报错 - # 第一次push时,将以自己Gitee-ID命名的本地、当前分支与远程分支关联 - git push --set-upstream origin woodrabbit - git status # 查看本地仓库当前状态 - git log # 查看提交历史 - ``` - - - -7. 在自己远程仓库的页面中新建PR,请求(**request**)上游仓库的master分支拉取(**pull**)自己新建分支(本例为*woodrabbit*)的更新。 - -8. [在上游仓库中查看](https://gitee.com/openeuler/git-basics/pulls)自己提交的PR并等待maintainer进行合入。 - - - -## 如何运行仓库中的程序 - -可以运行仓库中的main.c程序以观看提交后的效果。该main程序可以在Linux和类UNIX的macOS上运行。在Windows上,您可以看一下[openEuler开源创新实践课](https://gitee.com/openeuler/lfs-course/tree/master/lfs-7.7-systemd)中是如何创建虚拟机并安装openEuler操作系统以运行程序的。编译和运行该程序的命令如下所示: - -```shell -cd pr/primary/src/ -gcc main.c -./a.out -``` - -这样,凡是正确提交并被合入PR了的Gitee ID都可以在电脑屏幕上被打印出来……:) - - - -## 附1:Git参考书籍 - -- [英文版](https://git-scm.com/book/en/v2) -- [简体中文版](https://git-scm.com/book/zh/v2) -- [繁体中文版](https://git-scm.com/book/zh-tw/v2) diff --git a/pr/primary/docs/how-to-pr.md b/pr/primary/docs/how-to-pr.md deleted file mode 100644 index c69d9202ce80506a45fae7ac7df4b210a0888cf1..0000000000000000000000000000000000000000 --- a/pr/primary/docs/how-to-pr.md +++ /dev/null @@ -1,22 +0,0 @@ -# How to submit a PR - - - -![PR的流程](./images/pr.png "PR的流程") - -Pull Request,在开源社区也常常被简称为PR,是自己修改源代码后,请求上游仓库采纳该修改时采取的一种行为。如上图,提交PR的流程简述如下: - -1. 贡献者从社区官方代码库中fork一份代码到自己的库; -2. 将自己社区库中的代码clone到本地开发环境上; -3. 修改代码,解决bug或开发新feature; -4. 提交修改; -5. 将本地提交push到自己的社区库中; -6. 向社区官方代码库提交PR; -7. 待maintainer review后合入社区官方代码库。 - -以下是一些参考文档的链接: - -- [openEuler开源社区贡献攻略](https://www.openeuler.org/zh/community/contribution/) -- [如何参与openEuler社区](https://gitee.com/openeuler/community/tree/master/zh/contributors) -- [PR提交指南](https://gitee.com/openeuler/community/blob/master/zh/contributors/pull-request.md) -- [Gitee工作流说明](https://gitee.com/openeuler/community/blob/master/zh/contributors/Gitee-workflow.md) \ No newline at end of file diff --git a/pr/primary/docs/images/fork.png b/pr/primary/docs/images/fork.png deleted file mode 100644 index 4789f704a3dc55782dbb9737795518dbacf4e581..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/fork.png and /dev/null differ diff --git a/pr/primary/docs/images/git_logo@2x.png b/pr/primary/docs/images/git_logo@2x.png deleted file mode 100644 index f4518b1095723693de90eae4a795b37052c9fafa..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/git_logo@2x.png and /dev/null differ diff --git a/pr/primary/docs/images/gitee_id.png b/pr/primary/docs/images/gitee_id.png deleted file mode 100644 index e0ee21fce33e004eedaf26622d08d844d258c4c0..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/gitee_id.png and /dev/null differ diff --git a/pr/primary/docs/images/macos-key.png b/pr/primary/docs/images/macos-key.png deleted file mode 100644 index 2a4f999b3a8c79267d02591cb8ba3c6664d58a53..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/macos-key.png and /dev/null differ diff --git a/pr/primary/docs/images/pr.png b/pr/primary/docs/images/pr.png deleted file mode 100644 index 501ffbd1d125676afff556f174c3d51dc2b7fbee..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/pr.png and /dev/null differ diff --git a/pr/primary/docs/images/sign_individual_cla.png b/pr/primary/docs/images/sign_individual_cla.png deleted file mode 100644 index 4a03e13400da19b37c2ad5d2ad83dfdea2a8d8c0..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/sign_individual_cla.png and /dev/null differ diff --git a/pr/primary/docs/images/submission_email.png b/pr/primary/docs/images/submission_email.png deleted file mode 100644 index 3269acb5359ab0470015836f412d5301e8255b63..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/submission_email.png and /dev/null differ diff --git a/pr/primary/docs/images/windows-key.png b/pr/primary/docs/images/windows-key.png deleted file mode 100644 index 797b9a38386d98e70db41049f50ee133ba7e1b11..0000000000000000000000000000000000000000 Binary files a/pr/primary/docs/images/windows-key.png and /dev/null differ diff --git a/pr/primary/duan-wuhui b/pr/primary/duan-wuhui deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/isgaosn b/pr/primary/isgaosn deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/maasduan b/pr/primary/maasduan deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/obrian b/pr/primary/obrian deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/songyifan3367163 b/pr/primary/songyifan3367163 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/src/main.c b/pr/primary/src/main.c deleted file mode 100644 index 10bc340c9c6b67bc60b883e97e8ad8ff09edd94d..0000000000000000000000000000000000000000 --- a/pr/primary/src/main.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * main.c - * - * This program runs on Linux and UNIX-like macOS. - * - * Compile and run the program: - * gcc this-file - * ./a.out - */ - -#include -#include -#include -#include - -int main() { - // 其名称设置成Gitee-ID的文件将置于本程序的上级目录 - DIR *dir = opendir(".."); - if (dir == NULL) { - perror("Unable to open parent directory"); - return 1; - } - - struct dirent *entry; - - while ((entry = readdir(dir)) != NULL) { - // 0. Gitee-ID命名规则:只允许字母、数字或者下划线(_)、 - // 中划线(-),至少 2 个字符,必须以字母开头, - // 不能以特殊字符结尾。 - // 1. 本程序只处理常规文件(排除目录、软链接等)。 - // 2. 本程序会排除“.”和“..”目录项,也会排除带有扩展名的文件。 - if (entry->d_type == DT_REG && - strchr(entry->d_name, '.') == NULL) { - printf("Greetings from %s!\n", entry->d_name); - } - } - - closedir(dir); - - printf(":)\n"); - return 0; -} diff --git a/pr/primary/timeokai b/pr/primary/timeokai deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/woodrabbit b/pr/primary/woodrabbit deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/xuyuankun b/pr/primary/xuyuankun deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/yang b/pr/primary/yang deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/zhouzac b/pr/primary/zhouzac deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/primary/zlj b/pr/primary/zlj deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/pr/pro/info.txt b/pr/pro/info.txt deleted file mode 100644 index d1e44b98438df239a466a3066551135dcebd2535..0000000000000000000000000000000000000000 --- a/pr/pro/info.txt +++ /dev/null @@ -1 +0,0 @@ -ToDo: 代码提交、特性开发、问题修正、文档写作等的PR。