M.Sc. Juan Carlos Olivares Rojas

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

Github. Download & install git   Git bash  Git GUI.
om om GIT - Tips & Tricks / git.dvcs git-tips.com
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
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.
Git – versioning and managing your software L. Grewe.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
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.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
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 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
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.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
INTRODUCTION TO GIT. Install Egit for eclipse Open eclipse->Help->Install New Software Search for one of the following -
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Backing up a machine with git
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Version Control Systems
Basics of GIT for developers and system administrators
CS5220 Advanced Topics in Web Programming Version Control with Git
Source Control Systems
L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Primož Gabrijelčič Git for Programmers Primož Gabrijelčič
CReSIS Git Tutorial.
Git-Github Safa Prepared for the course COP4331 – Fall 2016.
CS/COE 1520 Recitation Week 2
Setting up Git, GitBash, and GitHub
SSE2034: System Software Experiment 3 Spring 2016
Version Control overview
Version control, using Git
Git branches and remotes
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
An introduction to version control systems with Git
Version Control with Git accelerated tutorial for busy academics
SU Development Forum Introduction to Git - Save your projects!
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
SIG: Open Week 1: GitHub Tim Choh.
Setting up Git, GitBash, and GitHub
An introduction to version control systems with Git
Git-Github Tools Prepared for COP4331. Git-Github Tools Prepared for COP4331.
Version control with Git Part II
Version Control System - Git
Version control with Git
Introduction to Git and GitHub
Қазақ Ұлттық Техникалық Зерттеу Университеті
Version Control with Git
Version Control with Git and GitHub
Version/revision control via git
Intro to Git and GitHub Version Control using Git Carol Schofield
Git GitHub.
Introduction to The Git Version Control System
Advanced Git for Beginners
Presentation transcript:

M.Sc. Juan Carlos Olivares Rojas Git Tutorial M.Sc. Juan Carlos Olivares Rojas Febraury, 2017

Definition Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. https://git-scm.com/

What’s Git?

Versions over the time

The Three State

Installing Git Windows, Mac and Linux has installers Additional in Linux you can use: $sudo yum install git-all $sudo apt-get install git-all

Configuring Git In Linux the main file configuration its in: /etc/gitconfig Personal configuration are in the home directory of the users: ~/.gitconfig or ~/.config/git/config

Configuring your identity The first step is configuring your personal information: git config --global user.name "Juan Carlos Olivares" git config --global user.email "jcolivares@itmorelia.edu.mx"

Configuring your identity git config list Shows all the configuration vars in local and global way git help <command> shows the help for this command

Initializing a repository In the shell, we neet to change to our source directory. In this directory we used the next command: git init For initializing the git repository.

Iniatilizing the repository If the directory has file or not, we can check the statusof the repository with the comand: git status The command list if exist files which where modified in the last review.

Checking the status of repository The command: git status Shows the files that are modified which aren´t in the stage area. We can adding these files with the command: git add <filename>

Passing files to the stagin area The commad: git add –A Adds all the files in the staging area. Te command: git diff <filename> Shows the changes in this file.

Passing to the version area The last area is the commit of the changes, we can do this with the following command: git commit –m “nameordescriptionofthechanges” After this we obtain and ID for the commit. This ID permits to return to the diferent versions of the repository.

Clonning an Existing Repository When te repository already exits we can get from the server through a clone process. We can apply this: git clone <urltogitfile.git> We need the credentials for the access

Upload changes in the remote repository We can upload the commits to the remote with the following commands: git push origin master Before this we need to configure the remote repository with this command: git remote add origin <urltoreposfile.git>

Downloads changes in the repository We can donwload to the local repositroy the changes applied to the remote repository with this command: git pull origin master This command is recomended before working with the git repository.

Donwload/Upload changes For doing the changes we need the authentification. For https security you must provide the user and password of your git server account. For ssh we need to generate a ssh key with the command ssh-key.

Download/Upload changes We need to put the public key in the remote server. Some of the most popular free git remote repositories are github, gitlab, bitbucket among others.

Adittional commands We can discard the changes of any file with: git checkout -- <filename> In the file .gitignore we can add any files or extension file that we want to ignore.

Aditional commands We can check the diferences bettwen commits using: git diff Aditional we can check the chances in one file with: git diff <filename>

Adittional Commands We can delete file with: git rm <filename> We can move files with: git mv <filename>

Logs in Git We can check the logs in git with the command: git log We can use git log --pretty=format:"%h %s" –graph for a better support

Tagging A tag is a special version in the repository that contains some commits. We can checks the tags with: git tag We can add tags with: git tag -a v1.4 -m "my version 1.4"

Tagging We can check all the changes in the tag with: git show <tag> The push command doesn’t upload the tags automatically. We can use: git push origin <tag>

Branches A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master. 

Branches

Branches

Branches We can add branches with: git checkout –b <branch> or git branch <branch> We can change between branches with: git checkout <branch>

Branches We need to push the changes in the remote repository with: git push origin <branch> We can merge two branches in one with: git merge <branch>

Merge branches When we merge two branches, git automatically resolve conflicts between changes in the file. In the case when a file is modified exactly in the sames line we need to resolve conflict manually though deleting the lines in conflict.

Questions? jcolivares@itmorelia.edu.mx