This exercise requires using a web browser, a text editor, and a console window for the system command prompt. As with modern open source software development practices, commands use (U/L)inux syntax. Open windows on the local desktop for the web browser, console, and editor before starting.
Note
Use your command line, console, or terminal to enter commands in this section.
To create a projects folder, at a terminal prompt type the following commands:
mkdir -p ~/Projects
cd ~/Projects
Type the following command to generate ssh keys for a user, if missing:
if [ ! -f ~/.ssh/id_rsa ]; then ssh-keygen -N '' -f ~/.ssh/id_rsa; fi
Choose a command from the following list to copy your SSH key to the clipboard:
Operating System | Command |
---|---|
KUbuntu Linux | cat ~/.ssh/id_rsa.pub | xclip |
Mac OS-X | cat ~/.ssh/id_rsa.pub | pbcopy |
Cygwin | cat ~/.ssh/id_rsa.pub | putclip |
Note
Use your web browser (Chrome, Firefox, or Safari) to access web services.
In the web browser, go to GitHub: https://github.com/login. Enter your Username and Password, then click Sign In.
Back to the console, enter command:
ssh -T git@github.com
At the “Are you sure ... (yes/no)?” question, type yes, press <Enter>.
You should get a response that you have successfully authenticated:
Note
Use your web browser (Chrome, Firefox, or Safari) to access web services.
There is no need to start from scratch when creating a documentation project. Instead, clone or fork someone else’s open source work. With your GitHub account,
GitHub will make a copy of the sample-collaborate repository for you, and then switch to view your copy.
Note
Use your command line, console, or terminal to enter commands in this section.
Once you own a repository on GitHub, you will want to clone it. The GitHub repository is remote, and cloning makes a local copy which you can edit. Here is the console command:
git clone (link_to_your_project) ~/Projects/sample-collaborate
There are two parameters to the git clone command. First is your project name, which is the text following “Git Read-Only” in the image below. (But copy the text from your fork of the repository please, so it will have your name instead of mine.) The second parameter is the folder name to create for the project.
Note
Use the file manager, the editor, and the web browser in this section.
From your file mamanger, right-click on file ~/Projects/readme.md and open it with your system editor. (Possible editors are listed below.)
Operating System | Command |
---|---|
KUbuntu Linux | From file manager, open with Kate |
Mac OS-X | From Finder, open with TextEdit |
Cygwin | From Computer, open with Notepad |
Note
Use your command line, console, or terminal to enter commands in this section.
At the command line, enter the following statements:
git add .
git status
git commit -m "Added my name to readme"
Note
Use your web browser (Chrome, Firefox, or Safari) to access web services.
Refresh your GitHub project page in the web browser to display the new readme.md in your project.
To the right of the project title, click the Pull Request button.
On the resulting page, enter a title and a request message, using Markdown syntax if desired. Click the Send pull request button to complete the request, as shown in the image below: