This document provides a summary of Git in 10 minutes. It begins with an overview and breakdown of the content which includes explanations of what Git is, how it works, the GitHub flow, frequently used commands, confusions around undoing changes, and useful links. The body then delves into each section providing more details on Distributed version control, local vs remote operations, the GitHub flow process, example commands for undoing changes, and resources for additional learning.
This document provides an introduction to Git and GitHub. It outlines the basics of Git including initializing repositories, tracking changes, branching, merging, and resolving conflicts. It also covers GitHub concepts such as cloning repositories from GitHub to a local machine and pushing/pulling changes between local and remote repositories. The document explains how to collaborate on projects hosted on GitHub using Git.
Github - Git Training Slides: FoundationsLee Hanxue
Slide deck with detailed step breakdown that explains how git works, together with simple examples that you can try out yourself. Slides originated from http://teach.github.com/articles/course-slides/
Author: https://twitter.com/matthewmccull
Git is a distributed version control system that was created by Linus Torvalds in 2005 to manage changes to files over time. It works by tracking changes made to files in a git repository and allowing users to commit snapshots of changes. The key git commands are git init to create a new repository, git clone to copy an existing one, git add to stage changes, git commit to commit staged changes, and git log to view the commit history. GitHub is a popular web-based hosting service for git repositories.
Two days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
This document provides an overview of Git and its basic commands for beginners. It covers installing Git, creating repositories on Bitbucket and GitHub, tracking changes with commands like add, commit, push, pull, and resolving merge conflicts. It also discusses branching, tagging, reverting changes, and ignoring files. Key concepts explained include distributed version control, staging changes, commit histories, and setting up aliases and submodules.
This document provides a brief introduction to Git, a distributed version control system. It describes what Git is and some of its key features, such as tracking changes to files over time, supporting distributed development, efficient object storage, easy branching and merging, and universal public identifiers. The document also discusses some of Git's internal mechanisms, such as SHA-1 hashes to uniquely identify objects, the index cache, and how commits and branches work.
Version control systems allow recording changes to files over time. There are local, centralized, and distributed version control systems. Git is a free and open-source distributed version control system created by Linus Torvalds. It provides features like speed, support for non-linear development, and ability to handle large projects efficiently.
A Git tutorial for rookies that covers most aspects of basic Git usage for a medium sized project.
This was originally a semestral lecture given at the TU Wien for the course "Software Engineering and Project Management"
Introduction to Git & GitHub.
Agenda:
- What’s a Version Control System?
- What the heck is Git?
- Some Git commands
- What’s about GitHub?
- Git in Action!
This document provides an outline for a course on learning Git version control. The course covers getting Git setup, the basic concepts and workflow of Git, branching and merging, resolving conflicts, working with remote repositories, and various Git commands. The document lists several modules that will be covered, including getting started, everyday Git usage, branching, merging and rebasing, additional tools and concepts, and advice on applying the skills learned. The goal is to teach participants how to install and use Git for version control on individual, local, and distributed projects.
This document provides an introduction to Git basics and concepts. It covers version control systems and why distributed version control is useful. It then discusses how Git originated from the Linux kernel project. The document reviews basic Git commands and workflows for setting up a repository, tracking and committing changes. It also covers viewing differences between commits, staging files, and undoing or amending commits. Finally, it discusses sharing repositories remotely including adding remotes, pushing and pulling from remote repositories, and cloning repositories from remote URLs.
This document provides an introduction to using Git and GitHub for version control. It covers common Git commands like init, add, commit, status, branch, merge, push and pull. It also explains how to set up a remote repository on GitHub and push/pull from a local repository. The document recommends using branches for new features and pull requests to merge them into the master branch. It emphasizes Git's abilities for distributed, collaborative development on GitHub.
The document provides an overview of version control systems and introduces Git and GitHub. It discusses the differences between centralized and distributed version control. It then covers the basics of using Git locally including initialization, staging files, committing changes, branching and merging. Finally, it demonstrates some common remote operations with GitHub such as pushing, pulling and tagging releases.
This document provides an overview of version control and the key features of Git. It defines version control as the management of changes to files over time. Git is introduced as a free, open source, and distributed version control tool that allows teams to easily share code and track revisions. The document outlines basic Git commands and GUI tools for visualizing repositories, along with benefits such as maintaining deployable code, backing up work, and reverting changes.
Git is a distributed revision control system that is widely used in the software development industry. The presentation was used in a lecture delivered in BITS-Pilani, India. The lecture served as a basic crash course on Git.
First, it sets off with a guide to install and configure git on various platforms.
Then, the basic working concepts of Git are explained.
This is followed by a detailed step-by-step guided demonstration of a sample workflow in Git.
Afterwards, Some auxillary commands that are frequently used are discussed briefly.
Finally, basic concepts of branching and merging are detailed.
The presentation ends with a few possible merge conflicts that occur in Git.
Github is an online hosting service for software development and version control that allows developers to store code and documentation in online repositories. Developers can collaborate on projects by making changes to code and documentation that are tracked by the version control system Git. Git allows developers to revert files or entire projects to previous versions, compare changes over time, experiment safely, and keep a revision history of the project.
This document discusses using Git and GitHub for version control. It covers Git terminology and commands for initializing a Git repository, configuring Git, adding and committing files, branching and merging, and using an code editor with Git. Key points include using 'git init' to create a new local repository, 'git add' to stage files for committing, 'git commit' to save changes to the repository, and 'git branch', 'git checkout' and 'git merge' for managing branches. The document provides guidance on writing good commit messages and installing Git on different operating systems.
Git is a distributed version control system that records changes to files over time. It allows multiple developers to work together and tracks the version history. The document outlines the basic concepts and commands of Git including repositories, commits, branches, merging, cloning, pulling and pushing changes between a local and remote repository. Examples are provided to demonstrate how to initialize a local repository, add and commit changes, switch branches, and push updates to a remote server.
This document discusses Git flow and workflows for features, releases, and hotfixes. It explains how to start and finish these branches using git flow commands or equivalent Git commands. It also provides tips for publishing remote branches, dealing with obsolete branches, and fixing common mistakes like amending commits, resetting files, and recovering deleted local branches.
Git is a version control system that stores snapshots of files rather than tracking changes between file versions. It allows for offline work and nearly all operations are performed locally. Files can exist in three states - committed, modified, or staged. Commits create snapshots of the staged files. Branches act as pointers to commits, with the default branch being master.
This document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
Version control systems allow recording changes to files over time. There are local, centralized, and distributed version control systems. Git is a free and open-source distributed version control system created by Linus Torvalds. It provides features like speed, support for non-linear development, and ability to handle large projects efficiently.
A Git tutorial for rookies that covers most aspects of basic Git usage for a medium sized project.
This was originally a semestral lecture given at the TU Wien for the course "Software Engineering and Project Management"
Introduction to Git & GitHub.
Agenda:
- What’s a Version Control System?
- What the heck is Git?
- Some Git commands
- What’s about GitHub?
- Git in Action!
This document provides an outline for a course on learning Git version control. The course covers getting Git setup, the basic concepts and workflow of Git, branching and merging, resolving conflicts, working with remote repositories, and various Git commands. The document lists several modules that will be covered, including getting started, everyday Git usage, branching, merging and rebasing, additional tools and concepts, and advice on applying the skills learned. The goal is to teach participants how to install and use Git for version control on individual, local, and distributed projects.
This document provides an introduction to Git basics and concepts. It covers version control systems and why distributed version control is useful. It then discusses how Git originated from the Linux kernel project. The document reviews basic Git commands and workflows for setting up a repository, tracking and committing changes. It also covers viewing differences between commits, staging files, and undoing or amending commits. Finally, it discusses sharing repositories remotely including adding remotes, pushing and pulling from remote repositories, and cloning repositories from remote URLs.
This document provides an introduction to using Git and GitHub for version control. It covers common Git commands like init, add, commit, status, branch, merge, push and pull. It also explains how to set up a remote repository on GitHub and push/pull from a local repository. The document recommends using branches for new features and pull requests to merge them into the master branch. It emphasizes Git's abilities for distributed, collaborative development on GitHub.
The document provides an overview of version control systems and introduces Git and GitHub. It discusses the differences between centralized and distributed version control. It then covers the basics of using Git locally including initialization, staging files, committing changes, branching and merging. Finally, it demonstrates some common remote operations with GitHub such as pushing, pulling and tagging releases.
This document provides an overview of version control and the key features of Git. It defines version control as the management of changes to files over time. Git is introduced as a free, open source, and distributed version control tool that allows teams to easily share code and track revisions. The document outlines basic Git commands and GUI tools for visualizing repositories, along with benefits such as maintaining deployable code, backing up work, and reverting changes.
Git is a distributed revision control system that is widely used in the software development industry. The presentation was used in a lecture delivered in BITS-Pilani, India. The lecture served as a basic crash course on Git.
First, it sets off with a guide to install and configure git on various platforms.
Then, the basic working concepts of Git are explained.
This is followed by a detailed step-by-step guided demonstration of a sample workflow in Git.
Afterwards, Some auxillary commands that are frequently used are discussed briefly.
Finally, basic concepts of branching and merging are detailed.
The presentation ends with a few possible merge conflicts that occur in Git.
Github is an online hosting service for software development and version control that allows developers to store code and documentation in online repositories. Developers can collaborate on projects by making changes to code and documentation that are tracked by the version control system Git. Git allows developers to revert files or entire projects to previous versions, compare changes over time, experiment safely, and keep a revision history of the project.
This document discusses using Git and GitHub for version control. It covers Git terminology and commands for initializing a Git repository, configuring Git, adding and committing files, branching and merging, and using an code editor with Git. Key points include using 'git init' to create a new local repository, 'git add' to stage files for committing, 'git commit' to save changes to the repository, and 'git branch', 'git checkout' and 'git merge' for managing branches. The document provides guidance on writing good commit messages and installing Git on different operating systems.
Git is a distributed version control system that records changes to files over time. It allows multiple developers to work together and tracks the version history. The document outlines the basic concepts and commands of Git including repositories, commits, branches, merging, cloning, pulling and pushing changes between a local and remote repository. Examples are provided to demonstrate how to initialize a local repository, add and commit changes, switch branches, and push updates to a remote server.
This document discusses Git flow and workflows for features, releases, and hotfixes. It explains how to start and finish these branches using git flow commands or equivalent Git commands. It also provides tips for publishing remote branches, dealing with obsolete branches, and fixing common mistakes like amending commits, resetting files, and recovering deleted local branches.
Git is a version control system that stores snapshots of files rather than tracking changes between file versions. It allows for offline work and nearly all operations are performed locally. Files can exist in three states - committed, modified, or staged. Commits create snapshots of the staged files. Branches act as pointers to commits, with the default branch being master.
This document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
The document discusses Git and Eclipse tools for working with Git. It describes EGit, an Eclipse plugin that provides integration with Git repositories, and JGit, a Java library for Git. EGit and JGit are open source projects hosted by the Eclipse Foundation. The document outlines features and history of EGit releases and the goal of building a community around Git usage at Eclipse.
In case you get started with Git, but you feel lost or you want to verify what you know, or you simply have no idea what this Git is... try this presentation. We used it several times to get engineers and non-engineers trained. It starts slowly, but also includes fundamentals to understand the difference between traditional source control and Git.
No warranties whatsoever of course. This is based on our experience, trial and error as well as assumptions. Git is complex, but beautiful.
Feedback welcome... and it is CC-BY-SA. So use it, share it, improve it.
P.S: This presentation will be updated often.
This document introduces version control and discusses its importance and challenges. It describes the different types of version control systems including local, centralized, and distributed systems. Key concepts like committing changes, updating workspaces, branching, and merging are explained. The document also highlights challenges like conflicts and provides tips to prevent them. Finally, it lists some popular web-based and open source version control systems and projects.
This document discusses Git and the Eclipse Git integration tool EGit. It provides an overview of Git's history and how it works, compares it to other version control systems, demonstrates common Git commands, and describes what EGit can do. The presentation then demonstrates using EGit for basic tasks like committing and branching, as well as more advanced workflows involving remote repositories and code review.
This document provides a summary of Chris Wanstrath's talk about the history and technical details of GitHub. It begins with Chris introducing himself and stating he will discuss GitHub. He then provides a brief history of GitHub starting as a git hosting site and evolving into a social coding platform. The rest of the talk focuses on the technical aspects including the web framework, application servers, databases, caching, jobs processing, search, git implementation, file serving, and monitoring.
Bitbucket as a Platform - Atlassian Summit 2012 Atlassian
Sam Tardif, a developer at Atlassian, gave a presentation about building applications using Bitbucket's REST API. He demonstrated how to retrieve issues, branches, changesets, and other repository data to build features like a card wall and issue tracker. Tardif also discussed authentication using OAuth and building apps with frameworks like Flask and Sinatra that interface with Bitbucket's API. He envisioned apps integrated directly into Bitbucket through custom tabs and remote iframes.
In these slides we analyze why the aggregate data models change the way data is stored and manipulated. We introduce MapReduce and its open source implementation Hadoop. We consider how MapReduce jobs are written and executed by Hadoop.
Finally we introduce spark using a docker image and we show how to use anonymous function in spark.
The topics of the next slides will be
- Spark Shell (Scala, Python)
- Shark Shell
- Data Frames
- Spark Streaming
- Code Examples: Data Processing and Machine Learning
Git is a version control system that allows developers to track changes in code and collaborate on projects. GitHub is a hosting service for Git repositories that offers collaboration features like code review and branching workflows. The document introduces Git and GitHub basics and outlines the GitHub Flow for collaborating via feature branching, pull requests, and code review before merging changes into the master branch. It concludes with reminders for good version control practices and sources for further information.
I have evidence that using git and GitHub for documentation and community doc techniques can give us 300 doc changes in a month. I’ve bet my career on these methods and I want to share with you.
Git 101 Presentation
The presentation introduces Git version control system including:
[1] An overview of version control systems and the basics of Git such as snapshots, local operations, and three main states of files.
[2] A comparison of features between Git and SVN such as distributed development and branching workflows.
[3] Instructions on setting up Git locally and with GitHub, and basic commands for creating and managing repositories, branches, commits, and merges.
Git is a version control system created by Linus Torvalds in 2005 to manage the Linux kernel source code. It is a distributed system where each user has their own local repository that can be synced with remote repositories. The basic Git workflow involves modifying files locally, staging them, and committing snapshots of the staged files to the local repository. Git tracks changes at a file level and uses SHA-1 hashes to identify commits rather than sequential version numbers.
This document provides an introduction and overview of Git version control system. It covers basic Git concepts and workflows, how to install and configure Git, perform common operations like committing, branching and merging, and additional tools and resources for learning more about Git. The document is intended as a starting point for those new to Git to learn the fundamentals and get started using it.
This document provides an introduction and overview of Git version control system. It covers basic Git concepts and workflows, how to install and configure Git, perform common operations like adding, committing, branching and merging, and also discusses more advanced topics like rebasing, cherry-picking, ignoring files and migrating from other VCS. The document aims to equip readers with essential knowledge for using Git in development projects.
a way to manage files and directories.
track changes over time.
recall previous versions.
source control is subset of VCS.
sharing on multiple computers
Types of vcs:
Local VCS
Centralized VCS
Distributed VCS
Features of git
commands in git
This document provides an introduction to version control with Git. It discusses the basic Git model and workflow, including cloning repositories, making local changes, staging files, and committing changes. It compares Git to centralized version control systems like Subversion and highlights Git's distributed and non-linear development advantages. Basic Git commands are explained like add, commit, status, diff, log, pull and push. Branching and merging with Git are also introduced.
This document provides an introduction and overview of Git version control system. It covers basic Git concepts and workflows, how to install and configure Git, perform common operations like committing, branching and merging, and additional tools and resources for learning more about Git. The document is intended as a starting point for those new to Git to learn the fundamentals and get started using it.
Git is a distributed version control system that allows developers to work on projects locally before pushing changes to remote repositories. It uses snapshots of file changes and checksums rather than file version numbers to track file history. The basic Git workflow involves modifying files locally, staging changes, and committing snapshots of the staged changes to the local repository. Changes can then be pulled from and pushed to remote repositories like GitHub.
Version control systems allow recording changes to files over time and reverting files back to previous states. Git is an open source distributed version control system initially created by Linus Torvalds for Linux kernel development. Git stores project snapshots over time as differences from a base version of files and allows fully local operations without needing network access. Basic Git commands include add, commit, branch, checkout, merge, push and pull to manage changes to a local or remote repository.
Git is a distributed version control system that allows developers to work together and track changes to code over time. It keeps track of changes by taking snapshots of the project that create unique IDs for each change. Developers can have their own copy of a repository and commit changes locally before pushing them to a remote server for others to access. This allows for non-linear development with features like branching and merging. GitHub is a popular site for hosting Git repositories online, but Git can also be used locally or with self-hosted servers.
GitHub is a web-based hosting service for version control using git. It is mostly used for computer code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
Find out why more and more developers are switching to Git - distributed version control. This intro to Git covers the basics, from cloning to pushing for beginners.
Git is a distributed version control system created by Linus Torvalds to manage changes to the Linux kernel. It allows developers to work independently and merge changes later. Git uses local repositories that can act as both clients and servers, avoiding the need to be connected to a central server. The basic Git workflow involves modifying files in the working directory, staging changes, and committing snapshots of the staged changes to the local repository. Common Git commands are used to add, commit, push, pull, branch, merge, and more. Key features of Git include being open source, distributed, providing security and speed, supporting non-linear development with branching and merging, and assuring data integrity.
Git is a source code management system that allows for distributed version control and collaboration on projects. It provides commands for initializing and cloning repositories, tracking and committing file changes, reverting and resetting commits, working on branches, and connecting local repositories to remote servers for sharing code with others. Key features include strong support for non-linear development, speed, portability, and distributed collaboration on large projects.
Git is a distributed version control system that allows users to track changes to files and collaborate with others. It maintains a database of snapshots of files and allows users to commit changes, compare changes between versions, and collaborate through a remote server. Some key aspects of Git include its use of snapshots rather than file differences, its local operations that add data, and its three stages of files - the working directory, staging area, and Git directory.
This document provides an introduction and overview of Git. It begins with a brief history of Git's origins with Linux source code management. It then covers key Git concepts like its distributed version control model, advantages like speed and resilience, and some basic commands. The document demonstrates setting up a sample Git repository and making commits. It also discusses branching, tagging, undoing changes, cleaning up repositories, and using remote repositories.
Git is a version control system created by Linus Torvalds in 2005 for tracking changes in source code over time. It allows for non-linear development through features like branching and distributed collaboration. The document provides an overview of common Git concepts and commands including initializing and cloning repositories, tracking file changes, committing snapshots of changes to the local repository, and interacting with remote repositories by pushing and pulling changes. Best practices for Git include not pushing directly to master, defining code owners, avoiding secrets and dependencies in commits, and maintaining a meaningful .gitignore file.
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
Hands On: Create a Lightning Aura Component with force:RecordDataLynda Kane
Slide Deck from the 3/26/2020 virtual meeting of the Cleveland Developer Group presentation on creating a Lightning Aura Component using force:RecordData.
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Impelsys Inc.
Impelsys provided a robust testing solution, leveraging a risk-based and requirement-mapped approach to validate ICU Connect and CritiXpert. A well-defined test suite was developed to assess data communication, clinical data collection, transformation, and visualization across integrated devices.
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Automation Dreamin' 2022: Sharing Some Gratitude with Your UsersLynda Kane
Slide Deck from Automation Dreamin'2022 presentation Sharing Some Gratitude with Your Users on creating a Flow to present a random statement of Gratitude to a User in Salesforce.
Rock, Paper, Scissors: An Apex Map Learning JourneyLynda Kane
Slide Deck from Presentations to WITDevs (April 2021) and Cleveland Developer Group (6/28/2023) on using Rock, Paper, Scissors to learn the Map construct in Salesforce Apex development.
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
3. Without Version Control
Systems
• Copy files into another directory
• Store or Share files backups by email
• Store or Share files by pendrive
4. Local Version Control
Systems
• Just a local
Database
• Systems:
– RCS - Revision
Control System
(Today is centralized)
http://git-scm.com
9. Centralized Version Control
Systems
• A Central Server
• The most used for
the companies
• Systems:
– CVS
– Subversion
– TFS
http://git-scm.com
10. Centralized Version Control
Systems
Advantages
• Everyone knows to a certain degree what everyone else on the project is
doing
• Administrators have more control over what everyone can do
Disadvantages
• If Server goes down, this means nobody can save changes
• If HD Server breaks, this means good bye all control version history
11. Distributed Version Control
Systems
• Distributed: each client
has fully mirror of the
repository
• Systems:
– Git
– Mercurial
– Bazaar
http://git-scm.com
12. Distributed Version Control
Systems
Advantages
• Everytime someone pulls from the central repository, Git gets a full
history of the changes
• Most of the functionalities doesn’t need access to some network. So we
can work even not connected to the internet
• A project can be associated to a more than one remote repository
• You can do anything just using the console
Disadvantages
• Git requires some learning curve to understand its concept
• The administrators don’t have control over what happens on each client
local repository
14. A Short History of Git
• (1991-2002) – The Linux kernel changes to the
software were passed around as patches and
archived files.
• (2002) – The Linux kernel project began using a
proprietary DVCS system called BitKeeper.
• (2005) – The relationship between Linux kernel
and the BitKeeper broke down. After that Linux
development community create their own tool
named Git, based on what they learned using the
BitKeeper.
15. Some Git Goals
• Speed
• Simple design
• Strong support for non-linear development
(thousands of parallel branches)
• Fully distributed
• Able to handle large projects like the Linux
kernel efficiently (speed and data size)
16. Git Basics
• Snapshots, Not Differences
• Nearly Every Operation Is Local
• Git Has Integrity
• Git Generally Only Adds Data
• The Three States
19. Nearly Every Operation Is
Local
• You can work offline as look the history,
commit some changes or create branchs
22. Git Has Integrity
• Git generate a SHA-1 hash for each commit
associated a file
• Git realize a checksum everytime is tried to
store some change. So Git knows when
something was changed or the file is
corrupted
24b9da6552252987aa493b52f8696cd6d3b00373
23. Git Generally Only Adds Data
• Doing commits regularly it is very difficult to
get the system to do anything that is not
undoable or lose some change
• Let us more comfortable to experiment
changes, because is easy to recover a previous
version
24. The Three States
http://git-scm.com
Modified/Untracked Staged Committed
26. So, what are we going to do?
• Configure • Alias
• Create a Repository • Diff
• Passing through the 3 • Tag
States • Ignoring Files and
• Branch Folders
• Merge • Getting a Remote
• Log Repository
• Basic Workflow
27. Configure
• Download and Install Git: http://git-scm.com/
• You just need the Git Bash to work
28. Username
git config --global user.name "Your Name Here"
# Sets the default name for git to use when you commit
Email
git config --global user.email "[email protected]"
# Sets the default email for git to use when you commit
29. Create a Repository
Access your project directory
cd your_folder_name
Create the repository
git init
Check the repository current status
git status
All your repository data and configuration is stored on a hidden folder named .git on your repository’s root
30. Passing through the 3 States
How is the status now?
Create or Change a file/folder From Nowhere/Repository Working Directory
touch file_name/folder
How is the status now?
Add objects to staging area Working Directory Staging Area
git add (general_comand/file_name/folder_name/…)
How is the status now?
Staging Area Repository
Save objects on local repository
git commit –m ‘This is my awesome comment’
How is the status now?
31. Adding, Removing and Renaming
Stages All
git add -A
Stages new and modified, without deleted
git add .
Stages modified and deleted, without new
git add -u
Stages a removed file
git rm file_name/
Stages a removed folder
git rm -r folder_name/
Stages a renamed file
git mv old_file_name new_file_name
32. .gitignore
Is a hidden file named .gitignore on your root’s repository that contains a list
of all ignored files and folders, like:
*.tmp
x64/
33. Diff
Compare the working directory with local repository
git diff HEAD file_name
Compare the working directory with staging area
git diff file_name
Compare the index with local repository
git diff --cached file_name
Compare the branchs showing just the status and file name
git diff --name-status branch_1 branch_2
34. Custom Alias
Create a new alias to show a log with graph
git config --global --add alias.lol "log --graph --
decorate --pretty=oneline --abbrev-commit --all"
Using the new alias
git lol
List all the local configurations
git config –-local -l
35. Branchs
Create and Switch for a new branch
git checkout –b branch_name
List all local branchs
git branch
Switch for a existing branch
git checkout branch_name
Working with Remote Repositories
Add a local branch for a remote repository
git push remote_name branch_name
Update local branch from a remote branch
git pull remote_name branch_name
36. Merges
Merge on the current branch changes made on another branch
git merge branch_name
Before merge
After merge
37. Merge Conflicts
Master Development
Merge conflict
Resolving the conflict
Commit the file after resolve the conflict
git commit –a -m ‘Resolving merge conflicts’
38. Tags
List all tags
git tag
Creating an annotated tag
git tag -a tag_name -m 'message description'
git tag -a v1.0 -m 'my version 1.0'
Working with Remote Repositories
Sharing tags
git push origin v1.0
All tags
git push origin --tags
40. Add and Pull a Remote
Repository
Cloning a or repository
git clone [email protected]:owner_repo/repo_name.git
Actually what the clone command does is: remote add + pull
git remote add origin
[email protected]:owner_repo/repo_name.git
git pull origin master
And actually what the default pull command does is: fetch + merge
Update local repository avoiding the amount of merges (fetch+rebase)
git pull --rebase repo_name branch_name
41. Pushing to the Remote
Repository
Pushing for the remote repository
git push remote_name branch_name
git push origin master
43. Others helpful (or not) commands
List of Git Contributors
git shortlog -s -n
Show the SHA1 of a file staged
git ls-files -s file_name
Show the SHA1 of a file modified
git hash-object file_name
Discard changes of a file
git checkout --file_name
44. Others helpful (or not) commands
Undo git add before commit
git reset HEAD file_name
One line logs
git log --pretty=oneline
Short status
git status -s
Delete the last commit before Push
git reset --hard HEAD~1