Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit: https://xkcd.com/1296/

Slides:



Advertisements
Similar presentations
om om GIT - Tips & Tricks / git.dvcs git-tips.com
Advertisements

Git
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git Intro Information mostly from Pro Git. Prepare  Start Eclipse, we have a 5-minute exercise later.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
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.
Git. What’s Git? A British swear A Distributed Version Control System Developed in 2005 by Linus Torvalds for use on the Linux Kernel Git Logo by Jason.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Peter Ogden and Josh Levine.  Motivation  High level overview  Walk through the common operations  How not to break things (too badly)
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
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.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git : Part 2 Checkout, Add, Commit These slides were largely cut-and-pasted from tutorial/, with some additions.
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.
Git Basics. Git stores data as snapshots of the project over time When commit Save all the files If files have not changed, point to the previous identical.
1 Applied CyberInfrastructure Concepts ISTA 420/520 Fall
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
Git Super Basics. What is Git? Version Control System (VCS) Successor to SVN in the Drupal eco-system A tool.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Version Control with Git xkcd.com/1597.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 16 – Version control and git.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
GIT: What, how and why ? Part 1: Basics. What do I know about git? Started using it for experiments on April 2009 Moved all voms development on git on.
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 A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
Version Control Systems
11 Version control (part 2)
CReSIS Git Tutorial.
Git Practice walkthrough.
CSE 374 Programming Concepts & Tools
Discussion 11 Final Project / Git.
Sign in on the attendance sheet!
Version Control with Git and GitHub
Sign in on the attendance sheet!
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Version control with Git
EGit in CCS
Version control with Git Part II
Git CS Fall 2018.
Version control with Git
Introduction to Git and GitHub
Convert an Eclipse Project to a Git repository and push up to GitHub
Git started with git: 2018 edition
Version Control with Git and GitHub
Git Introduction.
Git GitHub.
1. GitHub.
Introduction To GitHub
Introduction To GitHub
Presentation transcript:

Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit:

Review of Last Lecture Alt Text: If that doesn't fix it, git.txt contains the phone number of a friend of mine who understands git. Just wait through a few minutes of 'It's really pretty simple, just think of branches as...' and eventually you'll learn the commands that will fix everything.

Review of Last Lecture What is a commit? - A snapshot of all the files in a project at a particular time. When we compare commits, it is often more helpful to consider the changes made between two commits – i.e. the commits’ diff.

Review of Last Lecture git init – creates a git repo in the current directory git clone – copies the remote git repo into the current directory git log [ --oneline ] – lists all commits in the git repo, starting with the most recent one git help, git --help, man git – brings up the man help page for the git command

Leftover topics from last lecture The.git folder

Every git repository has a.git directory in the toplevel project directory This is where all git commit objects and metadata are stored Don’t delete it! Doing so deletes the repository

The Simple Git Commit Workflow 1.Inside the working directory, edit your project’s files as needed. 2.Add files with changes you’d like to commit to the staging area. 3.Commit the snapshot of files in the staging area. Edit-Add-Commit

git add Example use: git add scavhunt.c0 puzzle.c0 Updates a file (or files) in the staging area with the version in the working directory.

git commit Example use: git commit (or) git commit –m “commit message goes here” Creates a commit out of a snapshot of the staging area, and updates HEAD.

Aside: commit HEAD The “most recent commit” has a special name: HEAD

git status Example use: git status Shows files differing between the staging area and the working directory (i.e. unstaged changes), the staging area and HEAD (i.e. changes ready to commit), and untracked files

Example – initial state

Example – after autogen.ml edit

Example – after magic.rs edit

Example – after `git add magic.rs`

Example – after making commit (HEAD contains magic.rs (v6), Makefile (v5), autogen.ml (v5))

Example – after `git add autogen.ml` (HEAD contains magic.rs (v6), Makefile (v5), autogen.ml (v5))

Example – after a second git commit (HEAD~1 contains magic.rs (v6), Makefile (v5), autogen.ml (v5), HEAD contains magic.rs (v6), Makefile (v5), autogen.ml (v6))

Good commit messages Good: Build: Don't install jsdom3 on Node.js 0.10 & 0.12 by default Bad: bugfix lol get rekt

git diff Example use: (show unstaged changes) git diff (show staged changes) git diff --cached Shows unstaged changes or staged changes

.gitignore List of files and directories that git should ignore Store in toplevel project directory