Git with Bitbucket      Sumin Byeon       SmarTrek
Bitbucket• Hosting site for Git and Mercurial  repositories• Not to be confused with a version control  system• Not a nece...
Centralized Version     Control
Centralized Version        Control• Subversion, CVS, etc.• Everything goes to the server; users  commit changes to the sev...
Distributed Version      Control
Distributed Version         Control• Git, Mercurial, etc.• Each copy of repository is identical and  self-sufficient• No ne...
Git•   Distributed version control system•   Super fast•   Independent of network access or a central    server•   Cross p...
Benefits• Bitbucket is completely free if you have  a .edu email address• Since Git does not requires a central   server, w...
Workflow• Pull• Merge• Commit changes• More commits• Push
What To Store• Source code• Binary resources (e.g., images, sounds, etc.)• Build scripts• Documents (e.g., README, LICENSE...
What Not To Store• Anything that can be synthesized • Compiled binary, automatically generated     code (e.g., R.java for ...
Branches And Tags• Branch is basically a reference to a  particular commit  • Automatically updated whenever a    commit i...
Merging•$  git branch  * master    experimental•$   git merge experimental• Merge may fail due to conflicts
Conflict Resolution<<<<<<< HEAD:file.txtHello world=======Goodbye>>>>>>>77976da35a11db4580b80ae27e8d65caf5208086:file.txt •...
Emergency Kits• Before you have committed •$   git reset HEAD ${filename} •$   git checkout -- ${filename}• After you have...
Questions?
Upcoming SlideShare
Loading in...5
×

Git with bitbucket (draft)

1,308

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,308
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Git with bitbucket (draft)

    1. 1. Git with Bitbucket Sumin Byeon SmarTrek
    2. 2. Bitbucket• Hosting site for Git and Mercurial repositories• Not to be confused with a version control system• Not a necessity, but good to have for more effective collaboration
    3. 3. Centralized Version Control
    4. 4. Centralized Version Control• Subversion, CVS, etc.• Everything goes to the server; users commit changes to the sever, checkout the latest revision from the server.• No direct exchange between developers
    5. 5. Distributed Version Control
    6. 6. Distributed Version Control• Git, Mercurial, etc.• Each copy of repository is identical and self-sufficient• No need for a central server, but one may choose to have one• Developers may directly exchange changesets over Wi-Fi at a local coffee shop
    7. 7. Git• Distributed version control system• Super fast• Independent of network access or a central server• Cross platform• Superior branching and merging mechanism• Various protection devices against corruption
    8. 8. Benefits• Bitbucket is completely free if you have a .edu email address• Since Git does not requires a central server, we can even work in an airplane • Slave-driver-type supervisors (e.g., Dr. Chiu) will love this• (TODO: Explain why we prefer a distributed version control over a centralized one)
    9. 9. Workflow• Pull• Merge• Commit changes• More commits• Push
    10. 10. What To Store• Source code• Binary resources (e.g., images, sounds, etc.)• Build scripts• Documents (e.g., README, LICENSE)• Unit tests• Anything that constitutes a project
    11. 11. What Not To Store• Anything that can be synthesized • Compiled binary, automatically generated code (e.g., R.java for Android)• Personal preference configuration files• .gitignore file contains a list of files that will be ignored by Git
    12. 12. Branches And Tags• Branch is basically a reference to a particular commit • Automatically updated whenever a commit is made to that branch• Tag marks a particular commit • May be moved manually
    13. 13. Merging•$ git branch * master experimental•$ git merge experimental• Merge may fail due to conflicts
    14. 14. Conflict Resolution<<<<<<< HEAD:file.txtHello world=======Goodbye>>>>>>>77976da35a11db4580b80ae27e8d65caf5208086:file.txt • Must be resolved manually • Commit merged code when you are done
    15. 15. Emergency Kits• Before you have committed •$ git reset HEAD ${filename} •$ git checkout -- ${filename}• After you have committed •$ git revert HEAD •$ git commit --amend
    16. 16. Questions?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×