Git with the Flow
Here’s how to use git with project management from zero to hero.
https://bit.ly/gitwiththeflow
              $ hansel@pearlhacks: /whoami
              # UNC Charlotte Computer Science Peer Tutor
              # CompTIA Certified Secured IT Infrastructure
              Professional
              # Game Developers @ UNCC Education
              Coordinator
Hansel Wei    # 49 Security Division Lab Assistant
              # Full Stack Software Developer
              # DS+CS Intern at National Gypsum Company
   (Mentor)
                              [email protected]
                          Linkedin.com/hanselwei
                       GitHub.com/darkmastermindz
                       Twitter.com/darkmastermindz
                                          https://bit.ly/gitwiththeflow
What is git?
How do I git flow with my project?
●   Git is source control. Source control keeps track of changes in text.
●   Git helps you collaborate, share code, and save “checkpoints” (aka. commits) in a place called
    a repository
●   Gitflow is a a branching model strategy for Git, created by Vincent Driessen. Helps you divide
    and conquer a project with feature branches.
                   ● https://git-scm.com
First Time Using   ● $ git config --global user.name
                     "Hansel Wei"
Git? Setting up.
                   ● $ git config --global user.email                     
[email protected]                   ● $ git config --global color.ui
                     auto
               ● Create a repository on Github /
                 Azure DevOps / IBM Watson
 Git Project     Cloud
               ● Clone Repo
Management     ● Create a Develop Branch with a
                 README.md
Starter Pack   ● Create an Issue
                   ○   Could be a bug / feature
               ● Create a Project Automated
                 Kanban Board with Reviews
                 ( Github) / Project Board
                 (Azure)
           1. //Clone Repository
                 ○   $git clone https://your_repo_url.git
           2. Checkout a feature branch
                 ○   $ git checkout featureBranch
           3. Make changes to a file and add
 Typical      it. Example:
                  ○ $ git add hello.py
Workflow   4.
                  ○ $ git add goodbye.py
                $ git commit -m “code change comment
                here”
           5. $ git push origin master
                 ○   Upload to online repository
           6. Do a pull request on Github or
              Azure DevOps
              ● One person manages the
                Master Branch
              ● Pull before pushing
              ● Make a feature branch from
GitFlow 101     develop
              ● When you finish the feature,
   Rules        make a pull request.
              ● To see the commit_ids and see
                changes
                  ○   $git log
                       ■ $git log --follow [file]
                       ■ $git diff
                 ●   Oops, I accidently staged (add) changes
                     on the wrong branch
Dangerous, but
                       ○ $git stash
                       ○ $git checkout [branch-name]
                       ○ $git stash pop
   Useful        ●
                       ○ $git stash drop
                     Oops, I accidently staged (commit)
                     changes on the wrong branch
 Commands              ○ $git checkout [correct-branch]
                       ○ $git cherrypick commit_id
                       ○ $git checkout wrong-branch
                       ○ $git reset --hard HEAD^
                 ●   I haven’t committed yet, but I messed up
                     my code and want to restart from the
                     previous commit
                       ○ $git reset --hard
                ● Github Education
                ● Github Cheat Sheet
                  https://education.github.com/g
 Awesome          it-cheat-sheet-education.pdf
                ● Markdown Cheatsheet
Cheat Sheets:     https://guides.github.com/pdfs
                  /markdown-cheatsheet-online.
                  pdf
                ● Dang it, Git!
                   http://dangitgit.com/
                   Julia Evans (Zine Version) -
                   https://gumroad.com/l/dangit-git
                ● Detailed Slides w/ gitTracker
                     ○    https://drive.google.com/file/d/1c
               ● Github Desktop
  GUI Git      ● GitKraken
                   ○   Pro Version is free with Github
                       Student Pack
Applications   ● SourceTree
               ● Setting up with IDE’s such as
                 XCode, Atom, VS Studio,
                 Netbeans, Eclipse… etc.
Workshop Recap: Creating a Repo
Workshop Recap:
Creating a Repo for a Team on Github
   Check Initialize README &         Invite your team. Invitations are emailed.
  select a .gitignore and license.
Workshop Recap:
Creating a Repo for a Team on Github
                       You may optionally require someone else on your team to review
                                              before merging.