Version control systems track changes to source code over time by keeping a complete history of file versions in a database. Version control provides benefits like a change history, branching and merging, and traceability. Git is a distributed version control system that allows developers to work offline and collaborate by sharing changes. Developers use branches to work independently on features or bugs, then merge branches to combine changes.
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!
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"
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
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!
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"
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
Do you know the basics of Git but wonder what all the hype is about? Do you want the ultimate control over your Git history? This tutorial will walk you through the basics of committing changes before diving into the more advanced and "dangerous" Git commands.
Git is an open source, distributed version control system used to track many different projects. You can use it to manage anything from a personal notes directory to a multi-programmer project.
This tutorial provides a short walk through of basic git commands and the Git philosophy to project management. Then we’ll dive into an exploration of the more advanced and “dangerous” Git commands. Watch as we rewrite our repository history, track bugs down to a specific commit, and untangle commits into an LKML-worthy patchset.
Git is a distributed version-control system for tracking changes in source code during software development.
GitFlow is a branching model for Git which is very well suited to collaboration and scaling the development team.
To introduce and motivate some best practice around version control and Git.
Resources:
https://en.wikipedia.org/wiki/Version_control
https://git-scm.com/
https://try.github.io
http://rogerdudler.github.io/git-guide/
http://ohshitgit.com/
https://www.atlassian.com/git/tutorials
https://www.datacamp.com/courses/introduction-to-git-for-data-science
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumAbhijitNarayan2
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. This will be a beginner friendly session where we will explain to you how Git and Github works and how to use it for your future projects as well!
After talking to several Drupal followers during our last meetup, I realised quite a few people still don't employ version control.
I strongly consider this best practice when building a site, and thought it would be a good opportunity to go over its importance and how you can make it work for you.
Git offers several advantages:
• It's super fast
• It's easy.
• And no you don't need to be familiar with Command Line code (there are several great GUI's out there).
GIT Version Control works by keeping track of all successive changes you make to a site.
The biggest advantage of this is easily undoing any mistakes you might make along the way.
It's a great feeling to know Version Control has your back that you can roll back if something goes catastrophically wrong.
It's also a big bonus in collaborative development.
As soon as more than one person works on a project things get a lot more complicated.
What happens when 2 edits effect the same file? How do you know what's new, what's old and what's changed?
No worries, simply merge the variations and let GIT deal with the rest.
GIT is not just for the developers of this world but can be a life saver for themers, site maintainers and the like.
Most people will admit they should use it, but either don't know how or believe it's hard to integrate.
The reality is that it's actually pretty simple and once you start integrating GIT into your workflow you'll ask yourself "Why the hell did I keep using ftp" - I know I did.
FTP is so yesterday, its slow, it's cumbersome to use and it's a very manual method.
Switch to GIT, start using GIT, and never look back.
VCS: Version Control System
Git repository
Various Git Commands and their use
GitHub Local Repo and cloning a repo form remote server
use of git and its importance in todays IT Industry
● For most of the basic interactions with git you’ll mainly use 7 commands that we’ll cover here
git commands ● git init ● git clone ● git log ● git diff ● git status ● git add ● git commit
branching merging and git workflow
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
An introduction to Git and Github, tools for distributed version control that give an easy to use and highly collaborative approach to version code and configuration.
Do you know the basics of Git but wonder what all the hype is about? Do you want the ultimate control over your Git history? This tutorial will walk you through the basics of committing changes before diving into the more advanced and "dangerous" Git commands.
Git is an open source, distributed version control system used to track many different projects. You can use it to manage anything from a personal notes directory to a multi-programmer project.
This tutorial provides a short walk through of basic git commands and the Git philosophy to project management. Then we’ll dive into an exploration of the more advanced and “dangerous” Git commands. Watch as we rewrite our repository history, track bugs down to a specific commit, and untangle commits into an LKML-worthy patchset.
Git is a distributed version-control system for tracking changes in source code during software development.
GitFlow is a branching model for Git which is very well suited to collaboration and scaling the development team.
To introduce and motivate some best practice around version control and Git.
Resources:
https://en.wikipedia.org/wiki/Version_control
https://git-scm.com/
https://try.github.io
http://rogerdudler.github.io/git-guide/
http://ohshitgit.com/
https://www.atlassian.com/git/tutorials
https://www.datacamp.com/courses/introduction-to-git-for-data-science
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumAbhijitNarayan2
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. This will be a beginner friendly session where we will explain to you how Git and Github works and how to use it for your future projects as well!
After talking to several Drupal followers during our last meetup, I realised quite a few people still don't employ version control.
I strongly consider this best practice when building a site, and thought it would be a good opportunity to go over its importance and how you can make it work for you.
Git offers several advantages:
• It's super fast
• It's easy.
• And no you don't need to be familiar with Command Line code (there are several great GUI's out there).
GIT Version Control works by keeping track of all successive changes you make to a site.
The biggest advantage of this is easily undoing any mistakes you might make along the way.
It's a great feeling to know Version Control has your back that you can roll back if something goes catastrophically wrong.
It's also a big bonus in collaborative development.
As soon as more than one person works on a project things get a lot more complicated.
What happens when 2 edits effect the same file? How do you know what's new, what's old and what's changed?
No worries, simply merge the variations and let GIT deal with the rest.
GIT is not just for the developers of this world but can be a life saver for themers, site maintainers and the like.
Most people will admit they should use it, but either don't know how or believe it's hard to integrate.
The reality is that it's actually pretty simple and once you start integrating GIT into your workflow you'll ask yourself "Why the hell did I keep using ftp" - I know I did.
FTP is so yesterday, its slow, it's cumbersome to use and it's a very manual method.
Switch to GIT, start using GIT, and never look back.
VCS: Version Control System
Git repository
Various Git Commands and their use
GitHub Local Repo and cloning a repo form remote server
use of git and its importance in todays IT Industry
● For most of the basic interactions with git you’ll mainly use 7 commands that we’ll cover here
git commands ● git init ● git clone ● git log ● git diff ● git status ● git add ● git commit
branching merging and git workflow
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
An introduction to Git and Github, tools for distributed version control that give an easy to use and highly collaborative approach to version code and configuration.
Git Flow: un processus de développement AgileXavier Hausherr
Xavier HAUSHERR, CTO chez Overblog, présentera le processus complet de développement du projet Overblog qui est basé sur les méthodologies suivantes: Scrum, Git Flow, Github, Jenkins, PhpUnit/Symfony pour les tests unitaires, Watir/Cucumber pour les tests fonctionnels. La présentation détaillera la façon dont nous avons adapté Git Flow à Scrum, nos processus de déploiement, de tests ainsi que notre flux de mise en production.
How do you choose a git workflow that increases productivity and reduces the friction of your team? What are the battle tested practices of successful teams that moved to git? How is git used inside Atlassian?
As you might have heard git has many compelling features and has gained incredible momentum in the industry at large. Yet understanding how an enterprise team can adopt it can be daunting. The presentation aims to help answer these questions and more:
- Available collaboration models when using a distributed version control system like git
- Branching models that foster and enhance parallel development
- Emerging code best practices and choices that can be safely adopted when migrating to git
- How Continuous Integration changes when your team embraces git
Git is an important part of daily programming (especially if you're working with a team) and is widely used in the software industry. Since there are many various commands you can use, mastering Git takes time. But some commands are used more frequently (some daily). So in this post, I will share and explain the most used Git commands that every developer should know. Note: To understand this PDF, you need to know the basics and advances of Git. https://www.9series.com/
We'll explore the fundamentals of Git, a powerful and widely-used distributed version control system. As an essential tool for modern software development, Git streamlines collaboration, tracks changes, and ensures code integrity across projects. By the end of this session, you'll have a solid understanding of Git's core concepts, commands, and best practices, enabling you to confidently contribute to projects and enhance your workflow at Endava.
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.
The slide contains Git workflow, command line instructions to work with Git, examples of project management over GitHub.
In one of our weekly training, we’ve talked about Git. Here is a quick overview of the main concepts, basic commands and branching strategy, how to work with Git, how to contribute to an OSS project, …
Git Bash is a command line interface that allows you to interact with Git, a version control system that tracks changes in your code and lets you collaborate with other developers. Git Bash is based on a popular Unix shell called Bash, and it works on Windows operating systems. With Git Bash, you can create and manage Git repositories, stage and commit your code, push and pull from remote servers, create and merge branches, and much more. In this article, I will give you an introduction to Git Bash and show you how to use some basic commands. ¹²³
المصدر: محادثة مع Bing، 29/9/2023
(1) Git bash: Definition, commands, & getting started | Atlassian. https://www.atlassian.com/git/tutorials/git-bash.
(2) An introduction to Git: what it is, and how to use it - freeCodeCamp.org. https://www.freecodecamp.org/news/what-is-git-and-how-to-use-it-c341b049ae61/.
(3) Introduction to Git Bash: A Beginner's Guide to Using the Command Line .... https://marketsplash.com/tutorials/git/git-bash/.
(4) undefined. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
3. WHAT IS VERSION CONTROL?
Version control systems are a category of software tools that help a
software team manage changes to source code over time. Version
control software keeps track of every modification to the code in a
special kind of database.
▸ Benefits of version control
A complete long-term change history of every file
Branching and merging
Traceability
3
8. WHAT IS GIT?
▸ Git was initially designed and
developed in 2005 by Linux kernel
developers (including Linus
Torvalds) for Linux kernel
development.
▸ Having a distributed architecture.
Rather than have only one single
place for the full version history of
the software as is common in once-
popular version control systems
like CVS or Subversion.
8
10. GIT VS SUBVERSION PERFORMANCESeconds
0
350
700
1050
1400
PUSH/COMMIT PULL/CHECKOUT
GIT SUBVERSION GIT SUBVERSION
39.1
1,334.8
28.5104.5
Commit and checkout times of a repository of 2757 files and 428 directories, summing up to 26MB.
By: http://j.mp/1VY9KIl / CC BY-SA
10
11. GIT SECURITY
▸ Git has been designed with the integrity of managed
source code as a top priority. The content of the files as
well as the true relationships between files and directories,
versions, tags and commits, all of these objects in the Git
repository are secured with a cryptographically secure
hashing algorithm called SHA1.
▸ Some other version control systems have no protections
against secret alteration at a later date. This can be a
serious information security vulnerability for any
organization that relies on software development.
11
12. GIT IS A DE FACTO STANDARD
▸ The predominance of Git also means that many third party
software tools and services are already integrated with Git
including IDEs and tools like DVCS desktop clients:
▸ SourceTree (Windows/Mac)
▸ SmartGit (Windows/Linux/Mac)
▸ issue and project tracking software:
▸ JIRA
▸ and code hosting services
▸ GitHub
▸ Bitbucket
12
13. GIT VS SUBVERSION. GOOGLE TRENDS
Interest over Time (Git vs Subversion)
http://j.mp/23K41sb / Google Trends
13
15. SETTING UP A REPOSITORY
INSTALLING GIT
▸ Linux: apt-get/yum/dnf/zypper install git
▸ Windows and Mac OS X
https://git-scm.com/downloads
15
16. SETTING UP A REPOSITORY
git config
The git config command lets you configure your Git installation
from the command line. This command can define everything from
user info to preferences to the behavior of a repository.
‣ git config --global user.name <name>
‣ git config --global user.email <email>
‣ git config --global alias.<alias-name> <git-command>
‣ git config --system core.editor <editor>
‣ git config --list
16
17. SETTING UP A REPOSITORY
git init <directory>
‣ The git init command creates a new Git repository. It can be used
to convert an existing, unversioned project to a Git repository or
initialize a new empty repository. Most of the other Git
commands are not available outside of an initialized repository,
so this is usually the first command you’ll run in a new project.
‣ Executing git init creates a .git subdirectory in the project root,
which contains all of the necessary metadata for the repo. Aside
from the .git directory, an existing project remains unaltered
(unlike SVN, Git doesn't require a .git folder in every
subdirectory).
17
18. SETTING UP A REPOSITORY
git clone <repo>
‣ The git clone command copies an existing Git repository. This
is sort of like svn checkout, except the “working copy” is a full-
fledged Git repository—it has its own history, manages its own
files, and is a completely isolated environment from the original
repository.
‣ The original repository can be located on the local filesystem or
on a remote machine accessible via HTTP or SSH.
18
21. SAVING CHANGES - SNAPSHOTS, NOT DIFFERENCES
Storing data as changes to a base version of each file
Storing data as snapshots of the project over time
20
22. SAVING CHANGES - THE THREE STATES
▸ Committed
Committed means that the data is safely stored in your
local database.
▸ Modified
Modified means that you have changed the file but have
not committed it to your database yet.
▸ Staged
Staged means that you have marked a modified file in
its current version to go into your next commit snapshot.
21
23. SAVING CHANGES - THE THREE STATES
Working directory, staging area, and Git directory
22
24. SAVING CHANGES
git add <file/directory/.>
‣ The git add command adds a change in the working directory
to the staging area. It tells Git that you want to include updates
to a particular file in the next commit. However, git add doesn't
really affect the repository in any significant way—changes are
not actually recorded until you run git commit.
‣ In conjunction with these commands, you'll also need git
status to view the state of the working directory and the staging
area.
23
25. SAVING CHANGES - CHECKING THE STATUS OF YOUR FILES
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
24
26. SAVING CHANGES - CHECKING THE STATUS OF YOUR FILES
$ echo 'My Project' > README
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will
be committed)
README
nothing added to commit but untracked files present
(use "git add" to track)
25
27. SAVING CHANGES - CHECKING THE STATUS OF YOUR FILES
$ git add README
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: README
26
28. SAVING CHANGES
IGNORING FILES
▸ From time to time, there are files you don't want Git to
check in.
▸ If you create a file in your repository named .gitignore, Git
uses it to determine which files and directories to ignore,
before you make a commit.
$ cat .gitignore
*.[oa]
log/*.log
27
29. SAVING CHANGES
git commit
The git commit command commits the staged snapshot to the
local repository. Git will never change them unless you explicity
ask it to. Along with git add, this is one of the most important Git
commands. This command is nothing like svn commit.
$ git commit -m "Story 182: Fix benchmarks for speed"
[master 463dc4f] Story 182: Fix benchmarks for speed
2 files changed, 2 insertions(+)
create mode 100644 README
28
31. SAVING CHANGES
git checkout
The git checkout command serves three distinct functions:
checking out files, checking out commits, and checking out
branches
$ git checkout <branch>
$ git checkout <commit> <file>
$ git checkout <commit>
30
32. SAVING CHANGES
git revert <commit>
The git revert command undoes a committed snapshot. But,
instead of removing the commit from the project history, it figures
out how to undo the changes introduced by the commit and
appends a new commit with the resulting content.
31
33. SAVING CHANGES
git revert <commit>
The git revert command undoes a committed snapshot. But,
instead of removing the commit from the project history, it figures
out how to undo the changes introduced by the commit and
appends a new commit with the resulting content.
ResettingReverting
31
34. SYNCING
git fetch <remote> <branch>
‣ The git fetch command imports commits from a remote
repository into your local repo. The resulting commits are stored
as remote branches instead of the normal local branches that
we’ve been working with.
‣ Fetching is what you do when you want to see what everybody
else has been working on. Since fetched content is represented
as a remote branch, it has absolutely no effect on your local
development work.
32
35. SYNCING
git pull <remote>
‣ Merging upstream changes into your local repository is a
common task in Git-based collaboration workflows.
‣ You can think of git pull as Git's version of svn update. It’s an
easy way to synchronize your local repository with upstream
changes.
33
39. SYNCING
git push <remote> <branch>
‣ Pushing is how you transfer commits from your local repository
to a remote repo. It's the counterpart to git fetch, but whereas
fetching imports commits to local branches, pushing exports
commits to remote branches.
‣ After you’ve accumulated several local commits and are ready to
share them with the rest of the team
35
40. SYNCING
git tag -a <tag>
‣ Like most VCSs, Git has the ability to tag specific points in history
as being important. Typically people use this functionality to
mark release points (v1.0, and so on).
‣ Git uses two main types of tags: lightweight and annotated.
36
43. USING BRANCHES
git branch
‣ In Git, branches are a part of your everyday development
process. When you want to add a new feature or fix a bug—no
matter how big or how small—you spawn a new branch to
encapsulate your changes. This makes sure that unstable code is
never committed to the main code base
‣ A branch represents an independent line of development.
Branches serve as an abstraction for the edit/stage/commit.
‣ The git branch command lets you create, list, rename, and delete
branches
39
46. USING BRANCHES
git merge <branch>
‣ Merging is Git's way of putting a forked history back together
again.
‣ The git merge command lets you take the independent lines of
development created by git branch and integrate them into a
single branch.
41
49. COMPARING WORKFLOWS
CENTRALIZED WORKFLOW
44
Like Subversion, the Centralized
Workflow uses a central
repository to serve as the single
point-of-entry for all changes to
the project. Instead of trunk, the
default development branch is
called master and all changes
are committed into this branch.
This workflow doesn’t require
any other branches besides
master
50. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
SOMEONE INITIALIZES THE CENTRAL REPOSITORY
45
$ ssh user@host git init --bare /path/to/repo.git
51. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
EVERYBODY CLONES THE CENTRAL REPOSITORY
46
$ git clone ssh://user@host/path/to/repo.git
52. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
JOHN AND MARY WORK ON THEIR FEATURES
47
$ git status # View the state of the repo
$ git add <some-file> # Stage a file
$ git commit # Commit a file</some-file>
53. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
JOHN AND MARY WORK ON THEIR FEATURES
47
$ git push origin master
54. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY TRIES TO PUBLISH HER FEATURE
48
$ git push origin master
55. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY TRIES TO PUBLISH HER FEATURE
48
$ git push origin master
error: failed to push some refs to '/path/to/repo.git'
hint: Updates were rejected because the tip of your
current branch is behind
hint: its remote counterpart. Merge the remote changes
(e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push
--help' for details.
56. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY REBASES ON TOP OF JOHN’S COMMIT(S)
49
$ git pull --rebase origin master
57. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY REBASES ON TOP OF JOHN’S COMMIT(S)
49
$ git pull --rebase origin master
58. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY RESOLVES A MERGE CONFLICT
50
CONFLICT (content): Merge conflict in <some-file>
59. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY RESOLVES A MERGE CONFLICT
51
$ git status
60. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY RESOLVES A MERGE CONFLICT
51
$ git status
# Unmerged paths:
# (use "git reset HEAD <some-file>..." to unstage)
# (use "git add/rm <some-file>..." as appropriate to
mark resolution)
#
# both modified: <some-file>
61. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY RESOLVES A MERGE CONFLICT
52
#! /usr/bin/env ruby
def hello
<<<<<<< HEAD
puts 'hola world'
=======
puts 'hello mundo'
>>>>>>> master
end
hello()
62. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY RESOLVES A MERGE CONFLICT
52
#! /usr/bin/env ruby
def hello
puts 'hola world'
end
hello()
$ git add <some-file>
$ git rebase --continue
$ git rebase --abort
63. COMPARING WORKFLOWS - CENTRALIZED WORKFLOW
MARY SUCCESSFULLY PUBLISHES HER FEATURE
53
$ git push origin master
64. COMPARING WORKFLOWS
FEATURE BRANCH WORKFLOW
54
The core idea behind the Feature
Branch Workflow is that all feature
development should take place in a
dedicated branch instead of the
master branch. This encapsulation
makes it easy for multiple developers
to work on a particular feature
without disturbing the main
codebase. It also means the master
branch will never contain broken
code, which is a huge advantage for
c o n t i n u o u s i n t e g r a t i o n
environments.
65. COMPARING WORKFLOWS - FEATURE BRANCH WORKFLOW
MARY BEGINS A NEW FEATURE
55
$ git checkout -b marys-feature master
$ git status
$ git add <some-file>
$ git commit
66. COMPARING WORKFLOWS - FEATURE BRANCH WORKFLOW
MARY MAKES THE CHANGES
56
$ git push -u origin marys-feature
68. COMPARING WORKFLOWS
GITFLOW WORKFLOW
58
The Gitflow Workflow defines a strict
branching model designed around
the project release. While somewhat
more complicated than the Feature
Branch Workflow, this provides a
robust framework for managing
larger projects. This workflow doesn’t
add any new concepts or commands
beyond what’s required for the
Feature Branch Workflow. Instead, it
assigns very specific roles to different
branches and defines how and when
they should interact.
by Vincent Driessen | http://j.mp/1YLriqr
69. COMPARING WORKFLOWS - GITFLOW WORKFLOW
HISTORICAL BRANCHES
59
The master branch stores the official release history, and the
develop branch serves as an integration branch for features.
70. COMPARING WORKFLOWS - GITFLOW WORKFLOW
FEATURE BRANCHES
60
Each new feature instead of branching off of master, feature
branches use develop as their parent branch
71. COMPARING WORKFLOWS - GITFLOW WORKFLOW
FEATURE BRANCHES
61
May branch off from:
‣ develop
Must merge back into:
‣ develop
Branch naming convention:
‣ anything except master, develop, release-*, or hotfix-*
72. COMPARING WORKFLOWS - GITFLOW WORKFLOW
RELEASE BRANCHES
62
Once develop has acquired enough features for a release, you
fork a release branch off of develop.
73. COMPARING WORKFLOWS - GITFLOW WORKFLOW
RELEASE BRANCHES
63
May branch off from:
‣ develop
Must merge back into:
‣ develop and master
Branch naming convention:
‣ release-*
74. COMPARING WORKFLOWS - GITFLOW WORKFLOW
MAINTENANCE BRANCHES
64
Maintenance or “hotfix” branches are used to quickly patch production
releases. This is the only branch that should fork directly off of master.
75. COMPARING WORKFLOWS - GITFLOW WORKFLOW
MAINTENANCE BRANCHES
65
May branch off from:
‣ master
Must merge back into:
‣ develop and master
Branch naming convention:
‣ hotfix-*
77. SVN TO GIT 67
http://john.albin.net/git/convert-subversion-to-git
1. Retrieve a list of all Subversion committers.
2. Clone the Subversion repository using git-svn.
3. Convert svn:ignore properties to .gitignore.
4. Push repository to a bare git repository.
5. Rename “trunk” branch to “master”
6. Clean up branches and tags.
7. Drink.