GitHub Command Line Interface (CLI) |
---|
This is a guide for us, the terminal nerds, who want to do everything in the terminal, and thanks to Github-CLI, we can achieve it, remembering your first contribution should be fun, rewarding and a motivator to keep on going!
This guide is a bit more challenging since we are not using any graphical interface at all, but it's still really fun and you can definitely follow it!
The first requisite is to have:
- Git installed (how to install git)
- Github account
Now we need to install the github-cli
tool in our system by following the official documentation
After that, we need to login in the CLI, so enter this command:
gh auth login
Follow the instructions and we are ready!
It's just as easy as running this command:
gh repo fork firstcontributions/first-contributions
Important: It will prompt you if you want to clone it as well, select the "yes" option
We will do this step with git, so enter this command replacing the name with your name, for example:
git switch -c add-john-doe
Now you can open Contributors.md
file in a text editor and add your name to it. Put your name anywhere between the beginning and the end, then save the file.
In the project directory execute git status
and you will see the changes.
Add those changes to the branch you just created using the git add
command:
git add Contributors.md
Now commit those changes using the git commit
command:
git commit -m "Add your-name to Contributors list
replacing your-name
with your name.
Push your changes using the command git push
:
git push origin -u your-branch-name
replacing your-branch-name
with the name of the branch you created earlier.
If you get any errors while pushing, click here:
-
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com//first-contributions.git/'
Go to GitHub's tutorial on generating and configuring an SSH key to your account.
Now running this command in our repo's directory will let us create a pull request for review:
gh pr create --repo firstcontributions/first-contributions
After that submit the pull request.
You can use the command gh status
to see your mentioned pull request in action.
Congratulations! You have just completed the standard fork -> clone -> edit -> pull request workflow that you'll often encounter as a contributor!
Celebrate your contribution and share it with your friends and followers by going to web app.
You could join our slack team if you need any help or have any questions. Join slack team.
Now let's get you started with contributing to other projects. We've compiled a list of projects with easy issues you can get started on. Check out the list of projects in the web app.