Skip to content

Latest commit

 

History

History
71 lines (57 loc) · 3.01 KB

GitHub-Katas.md

File metadata and controls

71 lines (57 loc) · 3.01 KB

Position 1: Join the Dojo, Initialize Yatate file

  • Open command prompt
  • Change directory to working folder location
  • Add a text “.txt” file with your name and information
    • Or update your current text “.txt” file with a date and note
  • stages file, now ready for commit
  • upload your file

Position 2: Update your Yatate file

  • Open command prompt
  • Change directory to working folder location
  • pull down any new changes to local repository, before attempting to update your local files
  • Check your working tree with git diff
  • Update your Yatate file
  • see changes that were staged
  • push all the changes to remote repository.

Position 3: Create a Pull Request

Position 4: Create/Merge a Branch to the Master

Position 5: Commit Message

  • add all previously tracked files, does not capture any new files
  • commit rules
    1. Separate subject form body with a blank line (not easy)
      • use 2 message flags. The first will be interpreted as the Subject, then the other will be the content
      • example `git commit -m "<SUBJECT_LINE>" -m "<CONTENT_TEXT>"
    2. Limit the subject line to 50 characters
    3. Capitalize the Subject line
    4. Do not end the subject line with a period
    5. Use the imperative mood in the subject line
    6. Wrap the body at 72 characters
    7. Use the body to explain what and why vs. how

Position 6: Keep the Fork up-to-date

  • Add 'upstream' repo to list of remotes
  • Verify the new remote named 'upstream'
  • When you need to update your fork, you first fetch the upstream branches and commits into your repo. Checkout your master branch and merge upstream
    • Fetch from upstream remote
    • View all branches, including those from upstream
  • Checkout your master and merge the upstream repo master
  • Create a branch

Position 7: Remove current commit history

  • Remove the history from a commit so that your branch is only showing 1 commit.

Position 8: Move commit to a new branch

  • Move your last commit to a new branch and reset your original branch to the state it was before the last change.

Position 9: Create a GitHub Repo starting with local files

  • Create a new GitHub repo from a project that was started on your local machine.