Git, GitHub & Web Hosting Workshop

Similar documents
MATLAB & Git Versioning: The Very Basics

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

CS 2112 Lab: Version Control

Using GitHub for Rally Apps (Mac Version)

Version Control with Git

Introducing Xcode Source Control

Introduction to Version Control with Git

Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

Advanced Computing Tools for Applied Research Chapter 4. Version control

Version Control. Version Control

Data management on HPC platforms

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Version Uncontrolled! : How to Manage Your Version Control

Version Control with Subversion and Xcode

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Version Control using Git and Github. Joseph Rivera

Introduction to Version Control

Using Git for Centralized and Distributed Version Control Workflows - Day 3. 1 April, 2016 Presenter: Brian Vanderwende

Version Control for Computational Economists: An Introduction

Version Control. Luka Milovanov

Distributed Version Control with Mercurial and git

Source Control Systems

Version Control Systems: SVN and GIT. How do VCS support SW development teams?

Version Control! Scenarios, Working with Git!

Gitflow process. Adapt Learning: Gitflow process. Document control

Work. MATLAB Source Control Using Git

Using Git for Project Management with µvision

Introduction to Subversion

Git - Working with Remote Repositories

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Content. Development Tools 2(63)

Lab Exercise Part II: Git: A distributed version control system

SVN Starter s Guide Compiled by Pearl Guterman June 2005

Git. A Distributed Version Control System. Carlos García Campos carlosgc@gsyc.es

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

Working Copy 1.4 users manual

Git in control of your Change Management

Distributed Version Control

Version Control with. Ben Morgan

How to Create a Free Private GitHub Repository Educational Account

An Introduction to Mercurial Version Control Software

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

Software configuration management

Introduction to the Git Version Control System

Software Configuration Management. Slides derived from Dr. Sara Stoecklin s notes and various web sources.

Subversion Integration for Visual Studio

Developer Workshop Marc Dumontier McMaster/OSCAR-EMR

Version Control with Git. Kate Hedstrom ARSC, UAF

MATLAB as a Collaboration Platform Marta Wilczkowiak Senior Applications Engineer MathWorks

Zero-Touch Drupal Deployment

Introduction to Version Control with Git

MOOSE-Based Application Development on GitLab

CISC 275: Introduction to Software Engineering. Lab 5: Introduction to Revision Control with. Charlie Greenbacker University of Delaware Fall 2011

Version Control with Git

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

TOAD and SubVersion - A Quick How To. Norman Dunbar of Dunbar IT Consultants Ltd.

Version control with Subversion

Version Control with Subversion

Revision control systems (RCS) and

Your Web Site Parts - Domain Names, URLs, Web Hosts, DNS - What They Are, and What You Need

Version Control Tutorial using TortoiseSVN and. TortoiseGit

Version Control Using Subversion. Version Control Using Subversion 1 / 27

Version Control with Subversion

Double Feature Talk. 1) Intro to SSL 2) Git Basics for Devs & Designers

Introduc)on to Version Control with Git. Pradeep Sivakumar, PhD Sr. Computa5onal Specialist Research Compu5ng, NUIT

Parallels Plesk Panel 11 for your Linux server

Integrated version control with Fossil SCM

Version Control with Git. Dylan Nugent

AWS CodePipeline. User Guide API Version

Version control with GIT

Introduction to Source Control ---

TortoiseGIT / GIT Tutorial: Hosting a dedicated server with auto commit periodically on Windows 7 and Windows 8

FEEG Applied Programming 3 - Version Control and Git II

An Introduction to Git Version Control for SAS Programmers

Derived from Chris Cannam's original at, an.

Beginning with SubclipseSVN

Mercurial. Why version control (Single users)

Platform as a Service and Container Clouds

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

Setting up a local working copy with SVN, MAMP and rsync. Agentic

Source Code Control & Bugtracking

OS X Modular Imaging and Deployment using Free and Open Source Tools

Using Subversion in Computer Science

Two Best Practices for Scientific Computing

Source code management systems

Version Control with Mercurial and SSH

Contents. Using Web Access Managing Shared Folders Managing Account Settings Index... 39

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Transcription:

Git, GitHub & Web Hosting Workshop WTM Hamburg Git, GitHub & Web Hosting Documentation During our Workshops we re going to develop parts of our WTM Hamburg Website together. At this point, we ll continue collaborating all as a team via version control using Git, and hosting our website with GitHub to go live. This document will give you a general definition of what Git, GitHub and Web Hosting are and what they are used for. You can refer to this documentation at all Workshops, during the development of your tasks. What is Version Control and why should you use it? Version control is an important part of the everyday software development process. We need version control to keep track of the changes made to code and documents which make up software projects. There is a lot of good reasons for using a version control systems, as for instance when a file is deleted by mistake and needs to be recovered, which is made possible by version control. Also imagine working on a project with other people and having to tell every single one of them that you are currently editing a certain project file. Your co-workers would have to stop working on the same file because they might otherwise overwrite your changes.

This would be a pretty ridiculous workflow, right? Version control solves this problem by supplying each developer with their own local version of the code that he or she edits, so that nothing is overwritten. Read further: https://git-scm.com/book/en/v2/getting-started-about-version-control VSC (Version Control System) terminology The changes tracked by a version control system (short: VCS) are identified by a code made up of numbers and letters called the revision number. This number identifies the state of the code when the developer makes a commit. You can imagine commits to be a snapshot of the state of the files that make up a software project at a certain point in time. A commit, or "revision", is an individual change to a file (or set of files). When you save a file, it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made. You should always add commit messages to the commits because it makes it easier for you and others to keep track of the changes made to the code without having to go through all of it. Commit messages should be always meaningful, and as best practice should always be written in English and in present tense. E.g. Instead of I added tests for or Adding tests for, use Add tests for. Read further on commit guidelines here: https://git-scm.com/book/ch5-2.html In the screenshot below you can see a few commits made on the WTM HH website project. The first column displays the commit message. The

second and third column show when and by whom the change was made. The last column contains the revision number. Info: Once you start using a VCS you should get used to making commits of your code as often as possible. This helps keeping track of even the smallest changes in a software project and is generally considered good practice. Usually there is a server where the files and their commit histories are stored. This central code hub is called a repository. When you start working on an already existing project you have to clone the code from the repository. This process creates a local working copy and a local repository of the code on your computer. When making changes to the code only the working copy changes at first. To make the changes available to others and create a snapshot of the code at a certain stage you need to commit it. In some VCS this is enough to make the code accessible to others (E.g. Subversion). With the VCS we re using (Git) we still need to push the changes to the central repository so that others can access it from there by pulling our changes into their working copies. Some words of advice: At the beginning of your path as a developer all these words and terms can be very confusing. Don t worry though, we have all been there and know what it s like. You re gonna get the hang of it eventually! There is a lot of very good tutorials and resources on version control to help you. We have included some of them inside this file but be sure to also search online yourself. What is Git? Git is a Version Control System, an open source program for tracking changes in text files. It was written by (amongst others) the author of the

Linux operating system Linus Torvalds. It is a so-called distributed VCS. This means, that every developer has their own local working copy of the code, plus a local repository where all the changes made to the code in form of commits are saved. When the developer thinks it is time to make the commits available to others, he or she pushes them to the central repository where others can access them (by pulling the changes). Read about git and other kinds of version control systems: https://git-scm.com/book/en/v2/getting-started-about-version-control Branches A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes. To find out more about branching in git, read this: https://www.atlassian.com/git/tutorials/using-branches/ That tutorial also contains information about an important feature when working with branches: merging. Git commands overview To remember the different Git commands it is a good idea to have a cheat sheet: https://www.git-tower.com/blog/content/posts/54-git-cheat-sheet/gitcheat-sheet-large01.png It is good to know some of the most frequently used commands for Git Bash (also called Git Shell). Git Bash is a command line client that comes with GitHub for desktop.

The following commands are often used when working with Git: git status Shows the local changes in your working copy of the repository. git clone <url> Clones an existing repository from the specified URL and creates a working copy of it on your computer. git init Creates a new Git repository inside the directory Git Bash is pointing at. git checkout <branch> Changes from the current to the specified branch. All changes made from here on will be made on the newly checked-out branch. git add. / git add -p <file> 1) Add all local changes to be staged for the next commit. 2) Add changes in a specific file to be staged for the next commit. git commit -m A message Commit all staged changes and add a commit message in present tense. git pull <remote> <branch> Pull changes from a remote repository branch into your local repository. git push <remote> <branch> Push changes (commits) from your local repository to the remote repository branch. Read further: https://help.github.com/articles/github-glossary/ GitHub GitHub is a web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.

Git vs. GitHub A lot of people get these two things mixed up: Git is an open source version control system that keeps track of changes to a project s files. GitHub is an online service for hosting software projects. Git is the core technology that GitHub, the social and user interface, is built on top of. Unlike Git, which is strictly a command-line tool, GitHub provides a Webbased graphical interface and desktop as well as mobile integration. It also provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project. Web Hosting Web hosting or server is much like the space that you rent out to have your business in. It's merely the space itself. It does not include furnishings like shelves for your products, just as the web hosting account doesn't include a site for you to sell your products. Without the hosting services, you won't have a place for your files to reside, so your domain would then become like a disconnected phone number in the phone directory, and your site files would have nowhere to stay. Read further: https://en.wikipedia.org/wiki/web_hosting_service

Domain Name A domain name is a unique name that identifies a website. Domain names on the internet are much like entries in a phone book. The phone book tells people looking for people or a business what the entries are just as a domain tells people (i.e. their computers) that a domain is hosted on the server. Without a domain, you would have to tell people that your site is located at a temporary url such as 123.456.789.123/~mysite instead of using a domain name such as mysite.com. All domain names have a domain suffix, such as.com,.de,.net, or.org. The domain suffix helps identify the type of website the domain name represents. For example, ".com" domain names are typically used by commercial website, while ".org" websites are often used by non-profit organizations. What is the difference between domains vs. web hosting? Domain Name When you have a site visitor, they use your domain name to view your website. Web Hosting Service When a site visitor enters your domain name into a browser, the domain is then translated into your server IP address, then the server sends that user your site files, which their browser represents to them as a typical web page. Happy Coding! Women Techmakers HH Team