class: center, middle, inverse # Git and GitHub ## Version control ### or how to not lose your work --- class: inverse # Wassim DHIF ### Site Reliability Engineer @ OVH .left-column[![Need Git?](https://avatars3.githubusercontent.com/u/5231539?v=3&s=460)] .right-column[ ###
wdhif
###
@wassimdhif
###
+WassimDhif
###
wassimdhif
.footnote[Yes, I love the Elder Scrolls] ] --- # Summary 1. Version control * How to work as a team? * Version control solutions 2. Git * (Brief) History * Commandes * Good pratices * Install Git 3. GitHub * Host your Git repo * GitHub or Git++ 4. Live Demo --- #Work as a team? ##What is the best solution? * ##Dropbox * ##Google Drive * ##USB * ##Network (SMB, NFS) * ##~~FedEx~~ --- class: center, middle, inverse #NONE.red[*] .footnote[.red[*] No seriously, none, period.] --- class: center, middle, inverse # Need version control? ![Need Git?](public/images/needGit.jpg) --- # Give me version control! * ##SVN (Subversion) * ##Perforce * ##**T**eam **F**oundation **S**erver * ##Git --- # History * Replace BitKeeper for the version control of the Linux kernel * Developed by J.Hamano and L.Torvalds since 2005. ##.center[Git == an unpleasant person] --- # Commandes ## Most used * Status == Get the status of a repo * Pull == Get the last modifications * Push == Send your last modifications * Commit == "Validate" your modifications ---- ## (Slightly) less used * init == Create a repo * clone == Get an already existing repo * Revert == Get back to a previous _commit_ * Add/Rm == Add/Remove files to a _commit_ --- class: center, middle, inverse # How to use Git correctly ? ![Does not simply](public/images/doesNotSimply.jpg) --- # Good practices * ## Comment your _commit_ * ## _Pull_ before work * ## Usefull and complete _Push_ * ## Use _.gitignore_, _.gitkeep_, etc... * ## Use _Branches_ for heavy modifications --- # Install Git * ### On Windows: Git for Windows * ### On Linux: (Probably already installed) || apt-get install git || dnf install git || pacman -Syu git * ### On Mac: Xcode Command Line Tools ---- ### Clients * ### GitHub, TortoiseGit, SmartGit, Tower, etc... * ### IDE: JetBrains, Visual Studio, Eclipse, etc... --- # GitHub * ## Host your git repo * No configuration needed * Complete environment (wiki, issue) * ## Social network * Share your projects * Follow your favorites developers --- # GitHub or Git on steroids * ## Fork == Clone the sources of other developers. * ## Pull Request == Ask the creator to merge his work with yours * ## Issue == Manage bug reports and issues * ## Wiki == Create a wiki for your projects * ## github.io == Deploy freely your website on GitHub --- class: center, middle, inverse # Live Demo