/stil-workshop

Workshop scratch area for demo purposes

stil-workshop

Workshop scratch area for demo purposes

Demo

The demo will cover:

Participants will need Git installed and some knowledge of git commands in order to follow the tutorial.

Hands-on

Participants will be guided through the following steps:

  1. clone the repos locally on their end (need git software installed)
  • git clone https://github.com/tmtsoftware/stil-workshop.git
  • default landing branch should be master (default per repos)
    • git status to check on which branch you are
  1. create your feature/ticket branch from master
  • git checkout -b [branch name], required unique branch name, usually formatted as ISSUE-ID-meaningful-short-description
    • For demo, let's append github USERNAME to branch name
  • for example, let's take a ticket from JIRA board DEMOSS1
    • my branch name will be DEMOSS1-EJOLIET-bug-fix
  1. edit and change one line of the file in this repos named scratch.txt

  2. commit your changes in your branch: add/commit

    1. git add scratch.txt
    2. git commit -m"[your message]"
  3. continue changing/adding/commit and check the differences:

    1. git show
    2. Check your commit history: git log or more fancy git log --decorate --graph
    3. OPTIONAL: if no commit to be made, at that point, you can: pull or rebase
    • after pulling, check branches pulled: git branch --all
    • if master got new things, you will need to rebase in order to avoid conflict at the time you pull request
  4. Once done of changes, push to server (-u flag means that you'll start tracking the branch)

  • First time push: git push -u origin [branch name]
  • Your local branch is now synced with remote
  • Next pushes: git push
  1. Pull Request: in github.com, button 'pull request' should appear
  • Show a pull request / code review
  • OPTIONAL Show a case of how to request changes (and what to do)
    • if request change, need to go to the branch, and
      • change file, git add / commit / (rebase -i to squash) / push (steps 3 to 6 above)
      • no rebase there because branch is already in server / no force push either
  1. Show when approve changes and merge from github
  • Branch can be deleted from github after merged
  1. OPTIONAL: If merge conflict (typically, same line have changed in the meantime: github will suggest commands and guidelines to solve and merge locally

  2. Once merged, typically the branch can be deleted from github from the same pull request page.

Need Help?