pbossman / rtpsugmembers.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add yourself to RTPSUGMembers

Prerequisites: This guide assume Git and PowerShell are installed. An Image of yourself 400 by 400 pixels is used.

  1. We will start by forking the RTPSUGMembers repository. From the RTPSUGMembers repo Click the Fork button in the top right corner. Fork Click

  2. After the page refreshes you should notice that instead of saying:

    Fork1

    It should now say (with RTPSUGTest being your username):

    Fork2

    If you arent already using github pages on your account you can preview this page by changing the repository name to match your username.

    • Go to Settings
    • Change the Repository name to "(Your UserName).github.io"

    Rename Repo

    You can now point your browser to "(Your UserName).github.io" to view the page.

    You have officially Forked a Repo!

  3. Next we will clone the repository. Any directory on your local system should work but for our example we will use C:\repo

    • Click Clone or Download and copy the http:// address provided. Clone Repo
    • Open PowerShell
    New-Item -Type Directory C:\repo
    Set-Location C:\repo
    git clone https://github.com/RTPSUGTest/rtpsugtest.github.io.git
    #Replace URL above with URL that you copied from Github
    Set-Location C:\repo\rtpsugtest.github.io\
    #Replace rtpsugtest.github.io with your repository name

    Console

    If successful it should look like the above console.

    We have now copied the repository from Github down to our local machine. We can make changes and then push them back up.

  4. Next we will create a branch. Branches are used as a place to make changes that will not break your working code in Master.

    • From the PowerShell Console run: `git checkout -b AddMember'

    Console

  5. Now lets add our content and information page for ourselves in the members section of the website.

    • From the PowerShell Console in your local git folder run:
    copy-item .\_members\template.md .\_members\YourName.md
    notepad .\_members\YourName.md #Mac/Linux users can use VSCode or any other text editor.

    Make sure to change 'YourName.md' to your name or something unique and identifiable.

    • In notepad replace or remove all the relevant fields. Make sure to save when you are done.
    • The Image field will be a jpg that we will add in the next step make sure the name is unique, if you dont want to use your own image you can use sample.jpg, sample2.jpg, sample3.jpg, sample4.jpg, sample5.jpg or sample6.jpg and skip the next step.

    Console

  6. Adding our image. As mentioned above you can use one of the samples. If you use your own image:

    • Please only add images of yourself
    • Images should be appropriate
    • Make sure the image is reasonably sized (400x400)
    • Add the image to 'C:\Repo\TestRTPSUGMembers.github.io_members\images'
  7. Now we will push our changes back into git hub.

    • Go back to the PowerShell console, if you closed the console you will need to navigate back to your local repository folder.
    Set-Location C:\repo\rtpsugtest.github.io\
    #Replace rtpsugtest.github.io with your repository name
    • We need to check in all of our changes
    • Commit them to our local repository
    • Push them to the remote repository (Github)
        git add .
        git commit -m "John Smith added himself as a member"
        git push -u origin AddMember

    Console

  8. Lets see what we did. We will start by pulling our changes into Master, so that we can see them on our Github Page.

    • Bring up your browser and go back to your repository https://github.com/RTPSUGTest/rtpsugtest.github.io as our example.
    • It will default to the Master Branch, we need to switch branches and check our changes. You can do this by clicking the button that says "Branch: master" and then clicking the AddMember branch that we created.

    Console

    • Once you have switched branches you should see the message about the most recent commit you made. You can also click into the _members folder and see the files we added. Assuming everything is good we will move to the next step.
  9. In order for our Github Page to update our changes need them to be a part of the Master Branch. We will merge our branch with master by first submittein a pull request this pulls our changes from 'AddMember' into 'Master'.

    • Click the 'Pull requests' tab toward the top, then select the green 'New pull request' button.

    Console

    On the next page you will select what Repository and Branch you want to update or 'Pull' changes into and what Repository and Branch you want those changes to be 'Pulled' from.

    • For the base repository select the repository you created. This should be 'UserName/username.github.io' for our example it's RTPSUGTest/rtpsugtest.github.io.

    If you chose the right repository screen will simplify from allowing both a Repository(fork) and branch to just a branch for selection.

    Console

    • You now want to select the two branches 'Master' as the base and 'AddMember' as the compare.

    Console

    Now the screen will give you a comparison of what changes exist between the two branches. We should see only green and the file that we added with our information. If you added an Image that will appear as well.

    • If everything checks out you can click 'Create pull request' button.

    Console

    • Feel free to add a comment on the next page and click 'Create pull request' button again.

    Now you will have the opportunity to review your pull request. If you were submitting a pull request against a repository that you dont have permission to, someone else would need to review and merge the changes.

    • Click 'Merge pull request'

    Console

    • Click 'Confirm'
    • Click 'Delete branch' slightly to the right

    Console

    Thats it you have now done a pull request against your master branch and merged it.

  10. For the final part of this tutorial you will commit your change back to the original repository that you forked.

    • Start by navigating to the main page of your repository and verifying that you are on the master branch
    • Click 'New pull request'

    Console

    • On the next screen verify the left has "RTPSUGMember/rtpsugmembers.github.io" and "base:master"
    • Verify that the right contains your repository and "compare:master"
    • If you scroll down you will see details of the differences between the two versions.
    • Click 'Create pull request'

    Console

    • On this page you will put in comments for your pull request, this will be used by the owner of the repository to decide to accept your request.
    • After you enter the details of your request click "Create pull request"

    Console

    • THATS IT! now just wait for someone to get around to accepting your request. Get out there and start contributing to EVERYTHING!

    Console

About

License:MIT License


Languages

Language:CSS 43.8%Language:HTML 39.9%Language:JavaScript 14.8%Language:Ruby 1.4%Language:Elixir 0.0%