Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.

Slides:



Advertisements
Similar presentations
An Introduction By Sonali and Rasika.  Required for the project  Show the versions of your code in the course of development  Show versions of your.
Advertisements

Git/Unix Lab March Version Control ●Keep track of changes to a project ●Serves as a backup ●Revert to previous version ●Work on the same files concurrently.
Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
Using svn and git with Unity and sdk
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Fundamentals of Git By Zachary Ling 29 th, Aug,
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Git (Get) it done right! Practical Applied Version Control for Drupal site developers Peter Chen - Stanford School of Engineering Technical Webmaster.
Drexel University Software Engineering Research Group Git for SE101 1.
Version Control. How do you share code? Discussion.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git Fundamentals Rochelle Terman 13 January 2014.
Introduction to Version Control with Git CSC/ECE 517, Fall 2014 A joint project of the CSC/ECE 517 staff, including Titus Barik, Gaurav Tungatkar, Govind.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
Intro to Git presented by Brian K. Vagnini Hosted by.
1 Web Design Workshop DIG 4104c – Lecture 5c Git: Branch and Merge J. Michael Moshell University of Central Florida giantteddy.com.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Lecture 5 Remotes Sign in on the attendance sheet! Turn in homework at the front!
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
Collaborative Git An introduction to Git with others
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Version Control Systems
CS5220 Advanced Topics in Web Programming Version Control with Git
Information Systems and Network Engineering Laboratory II
Discussion #11 11/21/16.
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
Version Control with Subversion
11 Version control (part 2)
Version Control.
CS/COE 1520 Recitation Week 2
Setting up Git, GitBash, and GitHub
Discussion 11 Final Project / Git.
CS5220 Advanced Topics in Web Programming Version Control with Git
Macaualy2 Workshop Berkeley 2017
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
Source Code Management
The Big Picture
SIG: Open Week 1: GitHub Tim Choh.
Setting up Git, GitBash, and GitHub
Getting Started with Git and Bitbucket
Git and Jira Tutorials Kan Qi
Using Github.
Git CS Fall 2018.
Git started with git: 2018 edition
CMPE/SE 131 Software Engineering February 14 Class Meeting
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version Control with Git and GitHub
Git Introduction.
Introduction to Git and Github
Git GitHub.
Introduction to The Git Version Control System
Presentation transcript:

Hosted Git github

From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the students in the CS program. You genuinely want to see us succeed in our careers, above all else.

The Big Picture Now we’ll talk about this part

GitHub  Largest open source git hosting site  Public and private options  Public: everyone can see, but must be a collaborator to modify files  Public repos often used for large open source or to distribute libraries etc.  Private: only those you choose as collaborators can see/update  Try it  Log onto github  Walk through the tutorials

Getting an account  Set up a user account  Public account is free  Remember your password!  Get an educational account  Students get 5 private repos  After your account is created, send a discount request (may take a week or so to get a response)  Discount button on:  CS collaboration policy  Your homework must be stored in a private repository.

Creating a repo Option 1  Create repo on github  Add collaborators  Clone onto all machines Option 2  Use existing repo  Create repo on github  Add collaborators  Set up the connection between existing repo and github repo (called a remote)  Push code onto github  Clone onto other machines

Typical workflow (option 2) Person A  Setup project & repo  push code onto github  edit/commit  pull/push Person B  clone code from github  edit/commit/push  edit…  edit… commit  pull/push This is just the flow, specific commands on following slides. It’s also possible to create your project first on github, then clone (i.e., no git init)

Remote repository  Remote repository is a bare repository  There is no working directory  Four transfer protocols  http – this is what I recommend/use  local (not covered – good for shared filesystems)  git (not covered – fast but more setup)  SSH (used to be most common)  Use https on the client: git clone protocol userID repository When you create a repo on github, it will show you the HTTPS clone URL Avoid typos: a) copy the URL, b) in git bash, click git-icon/edit/paste OR press Insert.

Create the repo – Option 1  Log onto github  Click on + to add repository  Enter name  Add.gitignore, good to have a README  Click on Settings to control access (Collaborators tab)  On PC, do git clone

Create the repo – Option 2  Create your Java Project  Create your local repo  git init  git commit –m “Initial commit”  Create a repo on github  Add a “shortname” for your git repository  git remote add [shortname] [url]  git remote add origin name]/[repository name].git  Ex: git remote add origin  Remember: You can copy/paste the repo url from github  Push your code onto github  git push –u [remote-name] [branch-name].  Ex: git push –u origin master – enter username/password

Collaborating via github - cloning  git clone adds the remote repository under the name origin  git clone name]/[repository name].git  git clone

Example  Assume I have a repo named GUI2.git  In Eclipse: (from the directory where the clone was run): File -> New JavaProject -> GUI2

Push example  Make a change to one of the files  See status (I already made one commit)

Push example continued  Commit changes – updates local repo

Push example, continued

Keep everyone in synch  Be very careful not to make conflicting changes!  Merge with conflicts covered later  Two options for synchronizing:  Fetch/merge  Pull  Pull is usually simpler, so that’s what we covered.

Fetch example - On original machine  Fetch, merge fast-forward covered under branching

Pull example – on original machine  If you’re careful to avoid conflicts, and you’re working on the master branch, easier to just pull.  Make some changes on original machine  Don’t forget to commit! (see push below, didn’t work)

Pull continued  Note typo. git merge origin/master BUT git push origin master.  Merge is specifying the branch to merge (in this case master branch on remote named origin - branches covered in detail later).  Push is specifying the remote and the local branch. typo

Pull continued – on clone machine  git pull origin master  git pull (assumes origin, master)

Supplemental

SSH  Used to be most common transport for git  Pros  Allows reads and writes  Authenticated network protocol  Secure: data transfer is encrypted and authenticated  Efficient: makes data as compact as possible  Cons  No anonymous read-only access

Sidebar: What is SSH?  SSH is a protocol used for secure network communication Getting files from github Generate public/private keys (ssh-keygen) Distribute public keys (add key to github) Someone (github) sends secure “message” (files) – they encode with public key You receive the message/files – decode with private key (only you know) Putting files on github Process is reversed to send files to github You have the github public key (see github_rsa.pub, in Documents and Settings/Cyndi/.ssh on my machine) Use it to encode when sending github uses their private key to decode