在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):abhisheksingh98/HacktoberFest开源软件地址(OpenSource Url):https://github.com/abhisheksingh98/HacktoberFest开源编程语言(OpenSource Language):C++ 70.5%开源软件介绍(OpenSource Introduction):HacktoberFest 2021Happy Hacktober!This is a beginner friendly repository made specifically for Hacktoberfest that helps you get your first PR and takes you a step closer to earning your Hacktoberfest T-shirt. If you are a beginner, and looking for your first contribution, I'm here to help. Just append your favorite program/code be it hello world or some pattern printing in HacktoberFest and that counts as your first PR. Read Here or Refer to Git for more. Easy GuidelinesTo make your First PR follow the below commands:1. Cloning the ProjectUse the
2. Create a New BranchTo create your branch, from your terminal, change your directory so that you are working in the directory of the repository. Be sure to use the actual name of the repository (i.e. Hacktoberfest) to change into that directory.
Now, we’ll create our new branch with the
Now that our new branch is created, we can switch to make sure that we are working on that branch by using the git checkout command:
Once you enter the git checkout command, you will receive the following output:
At this point, you can now modify existing files or add new files to the project on your own branch. 3. Make Changes LocallyOnce you have modified existing files or added new files to the project, you can add them to your local repository, which you can do with the
or
4. Commit the messageNext, we’ll want to record the changes that we made to the repository with the git commit command. The commit message is an important aspect of your code contribution; it helps the other contributors fully understand the change you have made, why you made it, and how significant it is. Additionally, commit messages provide a historical record of the changes for the project at large, helping future contributors along the way. If you have a very short message, you can record that with the Example:
At this point you can use the Example:
5. Update Local RepositoryWhile you are working on a project alongside other contributors, it is important for you to keep your local repository up-to-date with the project as you don’t want to make a pull request for code that will cause conflicts. To keep your local copy of the code base updated, you’ll need to sync changes. We’ll first go over configuring a remote for the fork, then syncing the fork. 6. Configure a Remote for the ForkNext, you’ll have to specify a new remote upstream repository for us to sync with the fork. This will be the original repository that you forked from. You’ll have to do this with the
In this example, 7. Sync the ForkOnce you have configured a remote that references the upstream and original repository on GitHub, you are ready to sync your fork of the repository to keep it up-to-date. To sync your fork, from the directory of your local repository in a terminal window, you’ll have to use the
Switch to the local master branch of our repository:
You’ll now have to merge any changes that were made in the original repository’s master branch, that you will access through your local upstream/master branch, with your local master branch:
8. Create Pull RequestAt this point, you are ready to make a pull request to the original repository. You should navigate to your forked repository, and press the “New pull request” button on your left-hand side of the page. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论