Discussion 11 Final Project / Git.

Slides:



Advertisements
Similar presentations
Version Control System (Sub)Version Control (SVN).
Advertisements

LECTURE 13 OCT 18, 2010 A different take on more scripting stuff;& version control.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Using svn and git with Unity and sdk
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
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.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Chapter - 2 What is “GIT” VERSION CONTROL AND GIT BASICS.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Created by: Maria Abrahms Modified Date: Classification: How to get it done Contributing to OpenStack.
Git – versioning and managing your software L. Grewe.
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.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
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.
Version Control.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git Fundamentals Rochelle Terman 13 January 2014.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
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.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
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
Basics of GIT for developers and system administrators
Subversion Subversion is a brand of version control software that is frequently used to store the code and documentation of a project so as to permit.
Git primer Landon Cox January 19, 2017.
Information Systems and Network Engineering Laboratory II
Source Control Systems
Discussion #11 11/21/16.
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
EECS 183 Discussion #9: It’s time to “Git” Python! November 22nd, 2016
A Simple Introduction to Git: a distributed version-control system
Version Control.
IST256 : Applications Programming for Information Systems
Version Control overview
Version control, using Git
A Simple Introduction to Git: a distributed version-control system
Software Engineering for Data Scientists
Macaualy2 Workshop Berkeley 2017
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
Version Control System
Akshay Narayan git up to speed with RCS Akshay Narayan
Part 1: Editing and Publishing Files
User Guide Subversion client TortoiseSVN
Git Best Practices Jay Patel Git Best Practices.
Git CS Fall 2018.
Introduction to Version Control with Git
Git started with git: 2018 edition
Version Control with Git
GitHub and Git.
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version Control with Git and GitHub
Systems Analysis and Design I
GitHub 101 Using Github and Git for Source Control
1. GitHub.
Presentation transcript:

Discussion 11 Final Project / Git

Announcement and Administration Final Project Info All things Git Make sure to come to discussion for Python next week 11/20 proposal due

Being on a Team: Tricks for Maximizing Efficiency Take meeting minutes Write down who is supposed to do what when and what time you are going meet up next Hint: make a .txt file and push it to your repo before and after EVERY meeting Actually meet up in person, group chat does NOT suffice Set times and stick with them!!

Timeline for Final Projects Team Formation and Proposal: Sunday, 11/20 Core: Friday, 12/02 Core Team Evaluation: Saturday, 12/03 Full Implementation: Tuesday, 12/13 Final Team Evaluation: Wednesday, 12/14 Showcase: Thursday, 12/15

Using Git through the command line

Why Version Control Ease of collaboration & sharing Serves as a distributed backup

Why Version Control Ease of collaboration & sharing Serves as a distributed backup Builds a narrative of your project:

Distributed

Collaborating VIA Git

Best Practices Don’t use commits as a way to “save” your code. Don’t wait too long to commit. Careful not to commit sensitive info when pushing to GitHub.

Using Terminal

Important Commands to Know! cd [path] change directory to [path/place] ls list files/folders in directory ls -la (detailed list) pwd print working directory q quit mkdir [folder name or path] make directory

Getting STarted! git clone git status git push git pull git commit edit files git add

Git Clone This command makes a copy of a Git repository on your computer, in the directory that you run the command from Example > git clone https://github.com/yourName/hello.git If you ran this command from your Desktop, you would have a copy of the https://github.com/yourName/hello repository called hello on your Desktop Your hello repo on your Desktop is not the same copy as the repo you cloned from GitHub However, the other Git commands allow you to sync changes between the GitHub repository and your own

Git Status This command will output some information on the “status” of the repository you’re working in

Git pull This command “pulls” any changes from the centralized repository you cloned to your computer If someone else changed the repository that you cloned from, you need to be able to get the latest version of that repository git pull will make your local copy of the code up to date with whatever changes are in the repository you cloned from

EDITING FILES Just like you would in whichever IDE that you are using!

GIT ADD Going back to the idea of version control: you take “snapshots” of your code at different points in its lifetime git add is the first step to taking those “snapshots” It makes Git aware that you changed some files Say you edited myFirstGitProgram.cpp in your hello repository. You want to include your changes to myFirstGitProgram.cpp in your next “snapshot” of your code:

GIT COMMIT This command “takes a snapshot” of your local repository, by saving the state of whatever files you added git commit allows you to make versions of your code You can only commit files that you have first added using git add When you commit your code, you must always include a commit message that explains briefly what updates you have made to the code

GIT PUSH This command sends your local version of a repository back to the centralized repository that you cloned from Say you cloned from a repo on GitHub and committed some changes git push sends the changes you committed back to the centralized repository hosted on GitHub

Potential Problems in git

MERGE CONFLICTS Let’s say you and your teammate both edited line 1 of myFirstGitProgram.cpp. Your teammate pushed her changes to the centralized repository first, and then you committed your changes and pulled from your centralized repository Now Git is confused because there are two versions of the same code, and Git doesn’t know which one is right

MERGE CONFLICTS This is called a merge conflict When it happens you will see something like this:

MERGE CONFLICTS Your myFirstGitProgram.cpp file will look like something like this Don’t be scared by these symbols! Git just puts them there to differentiate between the two versions of the code it’s looking at The top part above ===== is your version of the code, the bottom part is the version that you pulled

MERGE CONFLICTS To fix a merge conflict, delete all the symbols Git added along with the version of the code you don’t want to keep In this example, everything highlighted in yellow will be deleted

MERGE CONFLICTS git add the file after you delete the symbols, and git commit to “resolve” the merge conflict That’s all you need to do to fix a merge conflict !!!

fatal: not a Git Repository If you ever get this error when running a Git command, you’re likely in the wrong directory Type pwd to print the directory that you’re currently in

Some Helpful Resources Learn Git Branching http://learngitbranching.js.org/ git – the simple guide http://rogerdudler.github.io/git-guide/

Feel free to ask any questions after class!