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

Version Control With Git

Version Control With Git

My talk for UCSY IT Camp 2014 - Version Control with Git

Avatar for Ye Lin Aung

Ye Lin Aung

January 24, 2014
Tweet

More Decks by Ye Lin Aung

Other Decks in Programming

Transcript

  1. Zwenexsys What is VCS ? • Version control or Source

    Control • Used in word processing, wiki system, software development
  2. Zwenexsys Why VCS ? • To share your codes or

    resources with others • To keep track of history • Easy to rollback
  3. Zwenexsys What is • Open source distributed VCS • Initially

    designed and developed by Linus Torvalds • Very popular
  4. Zwenexsys Configuration In your terminal / command prompt git config

    --global user.name "Your Name" git config --global user.email "[email protected]"
  5. Zwenexsys Initialization • Go to your project folder • Check

    if it’s correct folder • Run git init
  6. Zwenexsys Share with others • Push the local repo to

    remote repo • Git Hosting • BitBucket ( www.bitbucket.org ) • GitHub ( www.github.com )
  7. Zwenexsys Share with others • Create a repo at the

    hosting • Add the address to the local repo git remote add origin <remote url>
  8. Zwenexsys Share with others • Push it ! git push

    origin master • Pull it! git pull origin master
  9. Zwenexsys Share with others User A git add . git

    commit -m “bug fix #1” Remote Repo git push
  10. Zwenexsys Share with others User A git add . git

    commit -m “bug fix #1” Remote Repo git push User B git pull
  11. Zwenexsys Share with others User A git add . git

    commit -m “bug fix #1” Remote Repo git push User B git pull git add . git commit -m “bug fix #2”
  12. Zwenexsys Share with others User A git add . git

    commit -m “bug fix #1” Remote Repo git push User B git pull git add . git commit -m “bug fix #2” git push
  13. Zwenexsys Share with others User A git add . git

    commit -m “bug fix #1” Remote Repo git push User B git pull git add . git commit -m “bug fix #2” git push git pull