Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Version Control With Git and Github

Version Control With Git and Github

The session slides on "version Control With Git and Github" delivered by @NezSpencer during the ANC Developing Android Developers Meetup

Android Nigeria Community

September 28, 2017
Tweet

More Decks by Android Nigeria Community

Other Decks in Programming

Transcript

  1. Version control with Git and Github - Nnabueze Uhiara (software

    developer, iQube labs) @_NezSpencer https://github.com/NezSpencer
  2. Main points • What is version control? • Why version

    control? • Why Git? • Why github? • Setting up git • Git (proposed) workflow
  3. What is Version control System (VCS)? A system that records

    changes to a file or set of files over time so that you can recall specific versions later.
  4. Why Version control? • Collaboration • Synchronization • Knowing what

    changed and why it changed(diff, log and commit messages) • Allows undo (reverting to earlier versions) • Backup
  5. Git? • It is a distributed VCS • Enables offline

    work • Immunity to explore/try out new things • Large community
  6. Why GitHub? • Large community of fellow devs • Integrates

    seamlessly with other dev platforms • Helps to boost your CV • Show your work to the dev world. • Apparently gives you the liberty to use fork indiscriminately not minding what it rhymes with. PS: Git != GitHub
  7. Setting up git on your PC Go to https://git-scm.com/downloads and

    follow the instructions there to install git for your OS type
  8. Setting up a new git repo • Git init •

    Setup .gitignore • Git add • Git commit -m “commit message” • Git remote add origin https:gitrepo.git • Git push -u origin master
  9. Common git commands • Clone, • Checkout • Branch •

    Merge • Rebase • Commit • Push • pull
  10. Proposed git workflow Working on a new feature? Create a

    new branch : git checkout -b <feature-name> OR git branch <feature-name> git checkout <feature-name>
  11. Merge conflicts When does a merge conflict occur?/ What causes

    a merge conflict? Set up default merge-tool: git mergetool