Skip to content

Latest commit

 

History

History
110 lines (82 loc) · 3.63 KB

GITHUBING.md

File metadata and controls

110 lines (82 loc) · 3.63 KB

GitHub Workflow :octocat:

This is the GitHub workflow we use to contribute content to this repo. To follow the entire contributing process for this repo go to CONTRIBUTING.md.

Prerequisites

  1. Generating SSH keys

Workflow

  1. Fork from https://github.com/getcarina/getcarina.com

  2. Clone your fork of the repo using the SSH clone URL

    git clone [email protected]:my-github-username/getcarina.com.git
  3. Track the upstream repo

    cd getcarina.com
    git remote add --track master upstream [email protected]:getcarina/getcarina.com.git
  4. 🌅 Start new changes here.

    Bring your branch up-to-date with upstream

    git checkout master
    git pull --rebase upstream master
  5. Create a branch to make a change. If you'd like to see some lovely graphics, this step is the start of the Understanding the GitHub Flow guide.

    git checkout -b <name-of-branch>
  6. Add all files relevant to the change

    git add .
  7. Commit the changed files

    git commit -m "The reason for my change"
  8. Push your branch to your fork

    git push -u origin <name-of-branch>
  9. Create a pull request (PR) to the upstream repo for your branch

    1. Go to https://github.com/my-github-username/getcarina.com
    2. Click on the Create pull request button
    3. If this PR is related to an issue, include a link to that GitHub issue in the comment
  10. Notify rcs-tech a PR is ready for Tech Review

  11. Make updates to your PR by adding more commits

    git add .
    git commit -m "The reason for my update"
    git push
  12. When the tech review is complete, it's time for the Editorial Review

  13. Deal with conflicts

    During your review process, someone may have already updated and merged a file that you are in the process of changing. This can result in a conflict and you won't be able to merge your PR. First you need to bring your branch up-to-date with upstream. While on your <name-of-branch> do

    git fetch upstream
    git rebase upstream/master
    

    Then go ahead and Resolve a merge conflict from the command line.

  14. When the Editorial Review is complete and the button is green, Merge It!

  15. Update your repo

    git checkout master
    git pull --rebase upstream master
    git push

Tips and Tricks

Git prompt and completion

  1. Download git-prompt.sh and save it in your home directory as .git-prompt.sh
  2. Download git-completion.bash and save it in your home directory as .git-completion.bash
  3. Add the following to your .bash_profile in your home directory
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWUPSTREAM=1
source ~/.git-prompt.sh
source ~/.git-completion.bash

Help