SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
2
© 2018 Brent Laster@BrentCLaster
2
Advanced Git:
Functionality and Features
All Things Open 2019
Brent Laster
3
© 2018 Brent Laster@BrentCLaster
3
@BrentCLaster
About me
§ Director, R&D
§ Global trainer – training (Git, Jenkins, Gradle,
Gerriit, Continuous Pipelines)
§ Author -
§ OpenSource.com
§ Professional Git book
§ Jenkins 2 – Up and Running book
§ Continuous Integration vs. Continuous Delivery vs.
Continuous Deployment mini-book on Safari
§ https://www.linkedin.com/in/brentlaster
§ @BrentCLaster
4
© 2018 Brent Laster@BrentCLaster
4
@BrentCLaster
Book – Professional Git
§ Extensive Git reference, explanations, and
examples
§ First part for non-technical
§ Beginner and advanced reference
§ Hands-on labs
5
© 2018 Brent Laster@BrentCLaster
5
@BrentCLaster
Jenkins 2 Book
§ Jenkins 2 – Up and Running
§ Deployment pipeline automation as code
§ “It’s an ideal book for those who are new to
CI/CD, as well as those who have been
using Jenkins for many years. This book will
help you discover and rediscover Jenkins.”
By Kohsuke Kawaguchi, Creator of Jenkins
6
© 2018 Brent Laster@BrentCLaster
6
@BrentCLaster
Agenda
§ Core concepts refresh
§ Merging and Rebasing
§ Stash
§ Reset and Revert
§ Rerere
§ Bisect
§ Worktrees
§ Subtrees
§ Interactive Rebase
§ Notes
§ Grep
7
© 2018 Brent Laster@BrentCLaster
Check Out
Commit
C
h
e
c
k
o
u
t
C
o
m
m
i
t
Clone
Remote
Repository
Local
Environment
Central
Server
Local
Machine
Centralized Version Control Model Distributed Version Control Model
Centralized vs. Distributed VCS
8
© 2018 Brent Laster@BrentCLaster
8
@BrentCLaster
Git in One Picture
Staging Area
Remote Repository
Local Repository
Working Directory
P
u
l
l
Dev
Prod
Public
Test
C
h
e
c
k
o
u
t
Server
Add
Commit
Push Clone
Local Machine
F
e
t
c
h
9
© 2018 Brent Laster@BrentCLaster
9
@BrentCLaster
Git Granularity (What is a unit?)
§ In traditional source control, the unit of granularity is usually
a file
§ In Git, the unit of granularity is usually a tree
dir: proj1
file1.java
file2.java
Working directory
file1.java
CVS
GitCommit
file1.java
Delta
Commit
Snapshot
10
© 2018 Brent Laster@BrentCLaster
10
@BrentCLaster
Merging: What is a Fast-forward?
§ Assume you have three branches as below
§ You want to merge hotfix into master (so master will have
your hotfix for future development)
$ git checkout master
$ git merge hotfix
Updating f42c576..3a0874c
Fast Forward
README | 1-
1 files changed, 0 insertions(+) 1 deletions (-)
About “Fast Forward” – because commit pointed to by branch merged was
directly “upstream” of the current commit, Git moves the pointer forward
(Both branches were in the same line of development, so the net result is that
master and hotfix point to the same commit)
C2
C3
C0 C1 C4
feature
hotfix
11
© 2018 Brent Laster@BrentCLaster
11
@BrentCLaster
Merging: What is a 3-way Merge?
§ Assume branching scenario below
§ master and feature branches have both diverged (changed) since their last common
ancestor (commit/snapshot)
§ Intent is to change to master and merge in feature
§ Current commit on target branch isn’t a direct ancestor of current commit on branch
you’re merging in (i.e. C4 isn’t on the same line of development as C5)
§ Git does 3-way merge using common ancestor
§ Instead of just moving branch pointer forward, Git creates a new snapshot and a new
commit that points to it called a “merge commit”
$ git checkout master
$ git merge feature
C2
C3
C4
C5
feature
C0 C1
Common
Ancestor
Branch Tip
Branch Tip
master
12
© 2018 Brent Laster@BrentCLaster
12
@BrentCLaster
Merging: What is a Rebase?
§ Rebase – take all of the changes that were committed on one branch and replay them on
another one.
§ Concepts in simple syntax (git rebase branch2 [branch1]):
§ Move branchpoint of branch (carrying along all commits) to be off of a different commit (new base)
§ Current branch (or branch1 if supplied) is one having its branchpoint moved
§ Branch2 (or commit) provided as first/only argument is the new branchpoint
§ In simple case, think of it as “pick up branch1 entirely and move its branchpoint to be after the tip of branch2)”
§ Process:
§ Goes to the common ancestor of the two branches (the one you are on and the one you are rebasing onto)
§ Gets the diff introduced by each commit of the branch you are on, saving them to temporary files
§ Applies each change in turn
§ Moves the branch to the new rebase point
$ git checkout feature
$ git rebase master
C3
C4
C5
C0
Common
Ancestor
C2
feature
C1
C3’ C5’
C2
master
13
© 2018 Brent Laster@BrentCLaster
13
@BrentCLaster
Command: Git Stash
§ Purpose -- allow you to keep a backup copy of your work that
hasn’t been committed yet
§ Use case - you want to switch branches but don’t want to
lose work that hasn’t been committed; you want to save
something you’ve tried and may want to come back to
§ Syntax:
14
© 2018 Brent Laster@BrentCLaster
14
@BrentCLaster
Stash
Staging Area
Staging Area
Local Repository
Working Directory
stash@{0}
Staging
Area *
Working
Directory *
stash@{1}
Staging
Area **
Working
Directory
**#
stash@{0}
Staging
Area ***
stash@{2}
******
******
stash@{1}
stash@{0}
stash@{0}stash@{1}
stash@{1}stash@{2}
“cool feature”
Working
Directory
***
> git stash> git stash -u
#
> git stash save “cool feature”> git stash apply stash@{1}$ git stash pop stash@{2}
15
© 2018 Brent Laster@BrentCLaster
15
@BrentCLaster
Command: Git Reset
§ Purpose -- allow you to “roll back” so that your branch points
at a previous commit ; optionally also update staging area
and working directory to that commit
§ Use case - you want to update your local environment back to
a previous point in time; you want to overwrite or a local
change you’ve made
§ Syntax:
§ Warning: --hard overwrites everything
16
© 2018 Brent Laster@BrentCLaster
16
@BrentCLaster
Command: Git Revert
§ Purpose -- allow you to “undo” by adding a new change that
cancels out effects of previous one
§ Use case - you want to cancel out a previous change but not
roll things back
§ Syntax:
§ Note: The net result of using this command vs. reset can be
the same. If so, and content that is being reset/revert has
been pushed such that others may be consuming it,
preference is for revert.
17
© 2018 Brent Laster@BrentCLaster
17
@BrentCLaster
Local Repository
Reset and Revert
git reset --hard 87ba8bc
git reset current~1 [--mixed]
git revert HEAD
Line 1
Staging Area
Working Directory
XYZ
ABC
Line 1
87ba8bc 43bd3ef d21be2c
Line 1
Line 2
Line 3
c1c8bd4
Line 1
Line 2
Line 1
Line 2
Line 1Line 1 Line 1
Line 2
tag: current
Line 1
Line 2
18
© 2018 Brent Laster@BrentCLaster
18
@BrentCLaster
Command: Git Rerere (Reuse Recorded
Resolution)
§ Purpose -- allows recording of how you solve a merge
situation and then can automatically resolve the same
situation in the same way if needed later
§ Use case - trial and repeated merges; merging newer versions
of a branch with the same conflicts into a newer one
periodically; resolve conflicts after reset or revert; applicable
to any repeated merge case: rebase, merge
§ Syntax:
§ Note: This is a “state” command. Enabled by turning on a
state in Git, rather than just running a command
§ Enabled via git config --global rerere.enabled 1
» Then runs automatically
§ Invoked directly via git rerere for related commands or options
19
© 2018 Brent Laster@BrentCLaster
19Local Repository
feature
Staging Area
File B
Working Directory
File C
File A
File B
master
File A
File C
File B
File A
File C
File BFile B
File B
<<>>
File BFile A File CFile BFile A File C
rr-cache
File A File C
File B
<<>>
preimage postimage
File B
Git Rerere 1
20
© 2018 Brent Laster@BrentCLaster
20Local Repository
feature
Staging Area
File B
Working Directory
File C
File A
File B
master
File A
File C
File B
File A
File C
File BFile B
File B
<<>>
File BFile A File CFile BFile A File C
rr-cache
File A File C
File B
<<>>
preimage postimage
File B
Git Rerere 2
21
© 2018 Brent Laster@BrentCLaster
21
@BrentCLaster
Command: Bisect
§ Purpose - Use “automated” binary search through Git’s history to find a
specific commit that first introduced a problem (i.e. “first bad commit”)
§ Use case - Quickly locate the commit in Git’s history that introduced a bug
§ Syntax:
22
© 2018 Brent Laster@BrentCLaster
22
@BrentCLaster
Git Bisect
§ Use “automated” binary search to find change that first introduced a bug (i.e.
“first bad commit”)
§ Initiate with git bisect start
§ Can pass range to start option to identify bad and good revisions – i.e.
git bisect start HEAD HEAD~10
§ Identify first “bad” commit, usually current one via git bisect bad
§ Identify a “good” (functioning) commit via git bisect good
§ From there, git will do a binary search and pick a “middle” commit to checkout.
§ Try the checked out version and indicate git bisect good or git bisect bad depending on
whether it works or not.
§ Process repeats until git can identify “first bad” commit/revision.
§ Can grab previous good revision by specifying “first bad”^
§ Can update, create new branch, rebase, etc. to isolate good revisions.
§ Other useful options to git bisect: log, visualize, reset, skip, run
23
© 2018 Brent Laster@BrentCLaster
23
@BrentCLaster
LOCAL REPOSITORY
Version 1Version 1
Bisect
§ checkout latest version
§ try code
§ git bisect start
§ git bisect bad
§ checkout earlier version ( user checks out)
§ try code
§ git bisect good (bisect checks out version 5)
§ try code
§ git bisect good (bisect checks out version 7)
§ try code
§ git bisect bad (bisect checks out version 6)
§ try code
§ git bisect bad (git reports version 6 as the first bad
commit)
Version 3
Version 4
Version 5
Version 6
Version 7
Version 8
Version 9
Version 10Version 10
Version 5
Version 2
Version 7
Version 6
FIRST BAD COMMIT
WORKING DIRECTORY
24
© 2018 Brent Laster@BrentCLaster
24
@BrentCLaster
Background: Switching between Branches
Command: git checkout <branch>
git checkout master
§ Does three things
§ Moves HEAD pointer back to <branch>
§ Reverts files in working directory to snapshot
pointed to by <branch>
§ Updates indicators
git checkout testing
git checkout master
git checkout testing
§ git branch
Local Repository
Working Directory
*
*
87ba8bc 43bd3ef d21be2c c1c8bd4
master
testing
25
© 2018 Brent Laster@BrentCLaster
25
@BrentCLaster
Worktrees - syntax and usage
§ Syntax
§ git worktree add [-f] [--detach] [-b <new-branch>] <path> [<branch>]
§ git worktree list [--porcelain]
§ git worktree prune [-n] [-v] [--expire <expire>]
§ Subcommands
§ Add - create a separate working tree for specified branch
» has checked out copy of the branch
» if no branch specified, uses same name as temp area
§ List - lists out current set of working trees active for this repo
» porcelain - consistent and backwards-compatible format
§ Prune - removes worktree information from the .git area
» only applies after worktree directory tree has been removed
26
© 2018 Brent Laster@BrentCLaster
26
@BrentCLaster
Command: Worktree
§ Purpose - Allows multiple, separate Working Areas attached to one
Local Repository
§ Use case - Simultaneous development in multiple branches
§ Syntax
§ Notes
§ “Traditional” working directory is called the main working tree; Any new
trees you create with this command are called linked working trees
§ Information about working trees is stored in the .git area (assuming .git
default GIT_DIR is used)
§ Working tree information is stored in .git/worktrees/<name of worktree>.
27
© 2018 Brent Laster@BrentCLaster
27
@BrentCLaster
Worktree
§ git worktree add -b exp tree1
§ git worktree add -b prod tree2
Remote Repository
Main Working Tree
Server
Add
Commit
Push Pull
Staging Area
Local Repository
Working Directory
(master)
Local Machine
worktrees/
tree1
gitdir
HEAD
etc.
tree1
Linked Working Tree
Staging Area
Working Directory
(exp)
gitdir
HEAD
etc.
tree2
Linked Working Tree
Staging Area
Working Directory
(prod)
tree2
28
© 2018 Brent Laster@BrentCLaster
28
@BrentCLaster
Command: Subtree
§ Purpose - Allows including a copy of a separate repository
with your current repository
§ Use case - include a copy of a Git repository for one or more
dependencies along with the original repository for a project
§ Syntax
§ Notes
§ No links like a submodule - just a copy in a subdirectory
§ Advantage - no links to maintain
§ Disadvantage - extra content to carry around with your project
git subtree add -P <prefix> <commit>
git subtree add -P <prefix> <repository> <ref>
git subtree pull -P <prefix> <repository> <ref>
git subtree push -P <prefix> <repository> <ref>
git subtree merge -P <prefix> <commit>
git subtree split -P <prefix> [OPTIONS] [<commit>]
29
© 2018 Brent Laster@BrentCLaster
29
@BrentCLaster
Subtrees - overall view
30
© 2018 Brent Laster@BrentCLaster
30
@BrentCLaster
Subtrees - adding a project as a subtree
§ Simplest form, specify: prefix,
remote path to repository,
branch (optional)
§ Suppose we clone down a
project - myproject
§ And, on the remote side, we
have another project, subproj.
§ Now, we can add subproj as a
subtree of myproject (--prefix
subproject).
§ Subtree now shows subproject
in structure and history
31
© 2018 Brent Laster@BrentCLaster
31
@BrentCLaster
Command: (Interactive) Rebase
§ Purpose - allows you to run operations against commits in the
git history
§ Use case - you need to make some kind of modification to
one or more commits in the repository (rewrite history)
§ Syntax
§ Notes - creates an interactive script/batch file to modify
commits
§ Cautions - don’t use this on anything already pushed
32
© 2018 Brent Laster@BrentCLaster
32
@BrentCLaster
Interactive Rebase
§ Choose set of
commits
§ Initiate
interactive
rebase
§ Git presents
initial script
§ Modify
commands (save
and exit)
§ Act on prompts
§ Commits are
updated
33
© 2018 Brent Laster@BrentCLaster
33
@BrentCLaster
Command: Notes
§ Purpose - Add additional information to objects in the Git repository or
look at such information
§ Use case - At some point after making a commit, you may decide that
there are additional comments or other non-code information that you’d
like to add with the commit - without changing the commit itself.
§ Syntax
git notes [list [<object>]]
git notes add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
git notes copy [-f] ( --stdin | <from-object> <to-object> )
git notes append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
git notes edit [--allow-empty] [<object>]
git notes show [<object>]
git notes merge [-v | -q] [-s <strategy> ] <notes-ref>
git notes merge --commit [-v | -q]
git notes merge --abort [-v | -q]
git notes remove [--ignore-missing] [--stdin] [<object>…]
git notes prune [-n | -v]
git notes get-ref
34
© 2018 Brent Laster@BrentCLaster
34
@BrentCLaster
Notes
§ Create a note
§ Create a note in a custom
namespace (add --ref)
§ View a note (for a specific
revision)
§ List notes in log
35
© 2018 Brent Laster@BrentCLaster
35
@BrentCLaster
Command: grep
§ Purpose - provides a convenient (and probably familiar) way to search for regular
expressions in your local Git environment.
§ Use case - self-explanatory
§ Syntax
git grep [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp]
[-v | --invert-match] [-h|-H] [--full-name]
[-E | --extended-regexp] [-G | --basic-regexp]
[-P | --perl-regexp]
[-F | --fixed-strings] [-n | --line-number]
[-l | --files-with-matches] [-L | --files-without-match]
[(-O | --open-files-in-pager) [<pager>]]
[-z | --null]
[-c | --count] [--all-match] [-q | --quiet]
[--max-depth <depth>] [--color[=<when>] | --no-color]
[--break] [--heading] [-p | --show-function]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-W | --function-context]
[--threads <num>]
[-f <file>] [-e] <pattern>
[--and|--or|--not|(|)|-e <pattern>…]
[ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>…]
[--] [<pathspec>…]
§ Notes
§ Several options are similar to OS grep options
36
© 2018 Brent Laster@BrentCLaster
36
@BrentCLaster
grep
§ Default behavior - search for all instances of an expression across all tracked files in working directory
§ Search for all instances off expression “database” across all java files (note use of -- )
§ -p option tells Git to try and show header of method or function where search target was found
§ --break - make output easier to read
§ --heading - prints filename above output
§ boolean operators
§ search in staging area
§ search in specific commit(s)
37
© 2018 Brent Laster@BrentCLaster
37
That’s all - thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java DevelopersImesh Gunaratne
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeDr. Ketan Parmar
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformAll Things Open
 
Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...All Things Open
 
Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker
 
Effective Data Pipelines with Docker & Jenkins - Brian Donaldson
Effective Data Pipelines with Docker & Jenkins - Brian DonaldsonEffective Data Pipelines with Docker & Jenkins - Brian Donaldson
Effective Data Pipelines with Docker & Jenkins - Brian DonaldsonDocker, Inc.
 
Pragmatic software development in kdb+
Pragmatic software development in kdb+Pragmatic software development in kdb+
Pragmatic software development in kdb+Ajay Rathore
 
Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...All Things Open
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
 
Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...Docker, Inc.
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeDocker, Inc.
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker, Inc.
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
Intro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchIntro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchJohn Culviner
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiMike Goelzer
 
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Docker, Inc.
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the UnionElton Stoneman
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practiceDocker, Inc.
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using dockerThomas Kremmel
 

Was ist angesagt? (20)

Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...
 
Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker Meetup 08 03-2016
Docker Meetup 08 03-2016
 
Effective Data Pipelines with Docker & Jenkins - Brian Donaldson
Effective Data Pipelines with Docker & Jenkins - Brian DonaldsonEffective Data Pipelines with Docker & Jenkins - Brian Donaldson
Effective Data Pipelines with Docker & Jenkins - Brian Donaldson
 
Pragmatic software development in kdb+
Pragmatic software development in kdb+Pragmatic software development in kdb+
Pragmatic software development in kdb+
 
Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...Containers in depth – Understanding how containers work to better work with c...
Containers in depth – Understanding how containers work to better work with c...
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...
 
Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Intro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchIntro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratch
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the Union
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
 

Ähnlich wie Advanced Git - Functionality and Features

Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideRaghavendraVattikuti1
 
Git tutorial
Git tutorialGit tutorial
Git tutorialmobaires
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | WorkshopAnuchit Chalothorn
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 
Introduction to git, an efficient distributed version control system
Introduction to git, an efficient distributed version control systemIntroduction to git, an efficient distributed version control system
Introduction to git, an efficient distributed version control systemAlbanLevy
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-BryanLearningTech
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubDSC GVP
 
Git hub abduallah abu nada
Git hub   abduallah abu nadaGit hub   abduallah abu nada
Git hub abduallah abu nadaLama K Banna
 
Git tutorial undoing changes
Git tutorial   undoing changesGit tutorial   undoing changes
Git tutorial undoing changesLearningTech
 
Introduction to git, a version control system
Introduction to git, a version control systemIntroduction to git, a version control system
Introduction to git, a version control systemKumaresh Chandra Baruri
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get GitSusan Tan
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221Shinho Kang
 

Ähnlich wie Advanced Git - Functionality and Features (20)

GIT Rebasing and Merging
GIT Rebasing and MergingGIT Rebasing and Merging
GIT Rebasing and Merging
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slide
 
Git tips
Git tipsGit tips
Git tips
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Introduction to Git (part 2)
Introduction to Git (part 2)Introduction to Git (part 2)
Introduction to Git (part 2)
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Mastering GIT
Mastering GITMastering GIT
Mastering GIT
 
Git basics
Git basicsGit basics
Git basics
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
Introduction to git, an efficient distributed version control system
Introduction to git, an efficient distributed version control systemIntroduction to git, an efficient distributed version control system
Introduction to git, an efficient distributed version control system
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-Bryan
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Git hub abduallah abu nada
Git hub   abduallah abu nadaGit hub   abduallah abu nada
Git hub abduallah abu nada
 
Git github
Git githubGit github
Git github
 
Git tutorial undoing changes
Git tutorial   undoing changesGit tutorial   undoing changes
Git tutorial undoing changes
 
Introduction to git, a version control system
Introduction to git, a version control systemIntroduction to git, a version control system
Introduction to git, a version control system
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get Git
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
 

Mehr von All Things Open

Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityAll Things Open
 
Modern Database Best Practices
Modern Database Best PracticesModern Database Best Practices
Modern Database Best PracticesAll Things Open
 
Open Source and Public Policy
Open Source and Public PolicyOpen Source and Public Policy
Open Source and Public PolicyAll Things Open
 
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...All Things Open
 
The State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashThe State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashAll Things Open
 
Total ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptTotal ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptAll Things Open
 
What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?All Things Open
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractAll Things Open
 
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlowAll Things Open
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and SuccessAll Things Open
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with BackgroundAll Things Open
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblyAll Things Open
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksAll Things Open
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptAll Things Open
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramAll Things Open
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceAll Things Open
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamAll Things Open
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in controlAll Things Open
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsAll Things Open
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...All Things Open
 

Mehr von All Things Open (20)

Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of Observability
 
Modern Database Best Practices
Modern Database Best PracticesModern Database Best Practices
Modern Database Best Practices
 
Open Source and Public Policy
Open Source and Public PolicyOpen Source and Public Policy
Open Source and Public Policy
 
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
 
The State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashThe State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil Nash
 
Total ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptTotal ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScript
 
What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
 
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and Success
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with Background
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssembly
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in Haystacks
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit Intercept
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship Program
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open Source
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache Beam
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in control
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
 

Kürzlich hochgeladen

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Kürzlich hochgeladen (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Advanced Git - Functionality and Features

  • 1. 2 © 2018 Brent Laster@BrentCLaster 2 Advanced Git: Functionality and Features All Things Open 2019 Brent Laster
  • 2. 3 © 2018 Brent Laster@BrentCLaster 3 @BrentCLaster About me § Director, R&D § Global trainer – training (Git, Jenkins, Gradle, Gerriit, Continuous Pipelines) § Author - § OpenSource.com § Professional Git book § Jenkins 2 – Up and Running book § Continuous Integration vs. Continuous Delivery vs. Continuous Deployment mini-book on Safari § https://www.linkedin.com/in/brentlaster § @BrentCLaster
  • 3. 4 © 2018 Brent Laster@BrentCLaster 4 @BrentCLaster Book – Professional Git § Extensive Git reference, explanations, and examples § First part for non-technical § Beginner and advanced reference § Hands-on labs
  • 4. 5 © 2018 Brent Laster@BrentCLaster 5 @BrentCLaster Jenkins 2 Book § Jenkins 2 – Up and Running § Deployment pipeline automation as code § “It’s an ideal book for those who are new to CI/CD, as well as those who have been using Jenkins for many years. This book will help you discover and rediscover Jenkins.” By Kohsuke Kawaguchi, Creator of Jenkins
  • 5. 6 © 2018 Brent Laster@BrentCLaster 6 @BrentCLaster Agenda § Core concepts refresh § Merging and Rebasing § Stash § Reset and Revert § Rerere § Bisect § Worktrees § Subtrees § Interactive Rebase § Notes § Grep
  • 6. 7 © 2018 Brent Laster@BrentCLaster Check Out Commit C h e c k o u t C o m m i t Clone Remote Repository Local Environment Central Server Local Machine Centralized Version Control Model Distributed Version Control Model Centralized vs. Distributed VCS
  • 7. 8 © 2018 Brent Laster@BrentCLaster 8 @BrentCLaster Git in One Picture Staging Area Remote Repository Local Repository Working Directory P u l l Dev Prod Public Test C h e c k o u t Server Add Commit Push Clone Local Machine F e t c h
  • 8. 9 © 2018 Brent Laster@BrentCLaster 9 @BrentCLaster Git Granularity (What is a unit?) § In traditional source control, the unit of granularity is usually a file § In Git, the unit of granularity is usually a tree dir: proj1 file1.java file2.java Working directory file1.java CVS GitCommit file1.java Delta Commit Snapshot
  • 9. 10 © 2018 Brent Laster@BrentCLaster 10 @BrentCLaster Merging: What is a Fast-forward? § Assume you have three branches as below § You want to merge hotfix into master (so master will have your hotfix for future development) $ git checkout master $ git merge hotfix Updating f42c576..3a0874c Fast Forward README | 1- 1 files changed, 0 insertions(+) 1 deletions (-) About “Fast Forward” – because commit pointed to by branch merged was directly “upstream” of the current commit, Git moves the pointer forward (Both branches were in the same line of development, so the net result is that master and hotfix point to the same commit) C2 C3 C0 C1 C4 feature hotfix
  • 10. 11 © 2018 Brent Laster@BrentCLaster 11 @BrentCLaster Merging: What is a 3-way Merge? § Assume branching scenario below § master and feature branches have both diverged (changed) since their last common ancestor (commit/snapshot) § Intent is to change to master and merge in feature § Current commit on target branch isn’t a direct ancestor of current commit on branch you’re merging in (i.e. C4 isn’t on the same line of development as C5) § Git does 3-way merge using common ancestor § Instead of just moving branch pointer forward, Git creates a new snapshot and a new commit that points to it called a “merge commit” $ git checkout master $ git merge feature C2 C3 C4 C5 feature C0 C1 Common Ancestor Branch Tip Branch Tip master
  • 11. 12 © 2018 Brent Laster@BrentCLaster 12 @BrentCLaster Merging: What is a Rebase? § Rebase – take all of the changes that were committed on one branch and replay them on another one. § Concepts in simple syntax (git rebase branch2 [branch1]): § Move branchpoint of branch (carrying along all commits) to be off of a different commit (new base) § Current branch (or branch1 if supplied) is one having its branchpoint moved § Branch2 (or commit) provided as first/only argument is the new branchpoint § In simple case, think of it as “pick up branch1 entirely and move its branchpoint to be after the tip of branch2)” § Process: § Goes to the common ancestor of the two branches (the one you are on and the one you are rebasing onto) § Gets the diff introduced by each commit of the branch you are on, saving them to temporary files § Applies each change in turn § Moves the branch to the new rebase point $ git checkout feature $ git rebase master C3 C4 C5 C0 Common Ancestor C2 feature C1 C3’ C5’ C2 master
  • 12. 13 © 2018 Brent Laster@BrentCLaster 13 @BrentCLaster Command: Git Stash § Purpose -- allow you to keep a backup copy of your work that hasn’t been committed yet § Use case - you want to switch branches but don’t want to lose work that hasn’t been committed; you want to save something you’ve tried and may want to come back to § Syntax:
  • 13. 14 © 2018 Brent Laster@BrentCLaster 14 @BrentCLaster Stash Staging Area Staging Area Local Repository Working Directory stash@{0} Staging Area * Working Directory * stash@{1} Staging Area ** Working Directory **# stash@{0} Staging Area *** stash@{2} ****** ****** stash@{1} stash@{0} stash@{0}stash@{1} stash@{1}stash@{2} “cool feature” Working Directory *** > git stash> git stash -u # > git stash save “cool feature”> git stash apply stash@{1}$ git stash pop stash@{2}
  • 14. 15 © 2018 Brent Laster@BrentCLaster 15 @BrentCLaster Command: Git Reset § Purpose -- allow you to “roll back” so that your branch points at a previous commit ; optionally also update staging area and working directory to that commit § Use case - you want to update your local environment back to a previous point in time; you want to overwrite or a local change you’ve made § Syntax: § Warning: --hard overwrites everything
  • 15. 16 © 2018 Brent Laster@BrentCLaster 16 @BrentCLaster Command: Git Revert § Purpose -- allow you to “undo” by adding a new change that cancels out effects of previous one § Use case - you want to cancel out a previous change but not roll things back § Syntax: § Note: The net result of using this command vs. reset can be the same. If so, and content that is being reset/revert has been pushed such that others may be consuming it, preference is for revert.
  • 16. 17 © 2018 Brent Laster@BrentCLaster 17 @BrentCLaster Local Repository Reset and Revert git reset --hard 87ba8bc git reset current~1 [--mixed] git revert HEAD Line 1 Staging Area Working Directory XYZ ABC Line 1 87ba8bc 43bd3ef d21be2c Line 1 Line 2 Line 3 c1c8bd4 Line 1 Line 2 Line 1 Line 2 Line 1Line 1 Line 1 Line 2 tag: current Line 1 Line 2
  • 17. 18 © 2018 Brent Laster@BrentCLaster 18 @BrentCLaster Command: Git Rerere (Reuse Recorded Resolution) § Purpose -- allows recording of how you solve a merge situation and then can automatically resolve the same situation in the same way if needed later § Use case - trial and repeated merges; merging newer versions of a branch with the same conflicts into a newer one periodically; resolve conflicts after reset or revert; applicable to any repeated merge case: rebase, merge § Syntax: § Note: This is a “state” command. Enabled by turning on a state in Git, rather than just running a command § Enabled via git config --global rerere.enabled 1 » Then runs automatically § Invoked directly via git rerere for related commands or options
  • 18. 19 © 2018 Brent Laster@BrentCLaster 19Local Repository feature Staging Area File B Working Directory File C File A File B master File A File C File B File A File C File BFile B File B <<>> File BFile A File CFile BFile A File C rr-cache File A File C File B <<>> preimage postimage File B Git Rerere 1
  • 19. 20 © 2018 Brent Laster@BrentCLaster 20Local Repository feature Staging Area File B Working Directory File C File A File B master File A File C File B File A File C File BFile B File B <<>> File BFile A File CFile BFile A File C rr-cache File A File C File B <<>> preimage postimage File B Git Rerere 2
  • 20. 21 © 2018 Brent Laster@BrentCLaster 21 @BrentCLaster Command: Bisect § Purpose - Use “automated” binary search through Git’s history to find a specific commit that first introduced a problem (i.e. “first bad commit”) § Use case - Quickly locate the commit in Git’s history that introduced a bug § Syntax:
  • 21. 22 © 2018 Brent Laster@BrentCLaster 22 @BrentCLaster Git Bisect § Use “automated” binary search to find change that first introduced a bug (i.e. “first bad commit”) § Initiate with git bisect start § Can pass range to start option to identify bad and good revisions – i.e. git bisect start HEAD HEAD~10 § Identify first “bad” commit, usually current one via git bisect bad § Identify a “good” (functioning) commit via git bisect good § From there, git will do a binary search and pick a “middle” commit to checkout. § Try the checked out version and indicate git bisect good or git bisect bad depending on whether it works or not. § Process repeats until git can identify “first bad” commit/revision. § Can grab previous good revision by specifying “first bad”^ § Can update, create new branch, rebase, etc. to isolate good revisions. § Other useful options to git bisect: log, visualize, reset, skip, run
  • 22. 23 © 2018 Brent Laster@BrentCLaster 23 @BrentCLaster LOCAL REPOSITORY Version 1Version 1 Bisect § checkout latest version § try code § git bisect start § git bisect bad § checkout earlier version ( user checks out) § try code § git bisect good (bisect checks out version 5) § try code § git bisect good (bisect checks out version 7) § try code § git bisect bad (bisect checks out version 6) § try code § git bisect bad (git reports version 6 as the first bad commit) Version 3 Version 4 Version 5 Version 6 Version 7 Version 8 Version 9 Version 10Version 10 Version 5 Version 2 Version 7 Version 6 FIRST BAD COMMIT WORKING DIRECTORY
  • 23. 24 © 2018 Brent Laster@BrentCLaster 24 @BrentCLaster Background: Switching between Branches Command: git checkout <branch> git checkout master § Does three things § Moves HEAD pointer back to <branch> § Reverts files in working directory to snapshot pointed to by <branch> § Updates indicators git checkout testing git checkout master git checkout testing § git branch Local Repository Working Directory * * 87ba8bc 43bd3ef d21be2c c1c8bd4 master testing
  • 24. 25 © 2018 Brent Laster@BrentCLaster 25 @BrentCLaster Worktrees - syntax and usage § Syntax § git worktree add [-f] [--detach] [-b <new-branch>] <path> [<branch>] § git worktree list [--porcelain] § git worktree prune [-n] [-v] [--expire <expire>] § Subcommands § Add - create a separate working tree for specified branch » has checked out copy of the branch » if no branch specified, uses same name as temp area § List - lists out current set of working trees active for this repo » porcelain - consistent and backwards-compatible format § Prune - removes worktree information from the .git area » only applies after worktree directory tree has been removed
  • 25. 26 © 2018 Brent Laster@BrentCLaster 26 @BrentCLaster Command: Worktree § Purpose - Allows multiple, separate Working Areas attached to one Local Repository § Use case - Simultaneous development in multiple branches § Syntax § Notes § “Traditional” working directory is called the main working tree; Any new trees you create with this command are called linked working trees § Information about working trees is stored in the .git area (assuming .git default GIT_DIR is used) § Working tree information is stored in .git/worktrees/<name of worktree>.
  • 26. 27 © 2018 Brent Laster@BrentCLaster 27 @BrentCLaster Worktree § git worktree add -b exp tree1 § git worktree add -b prod tree2 Remote Repository Main Working Tree Server Add Commit Push Pull Staging Area Local Repository Working Directory (master) Local Machine worktrees/ tree1 gitdir HEAD etc. tree1 Linked Working Tree Staging Area Working Directory (exp) gitdir HEAD etc. tree2 Linked Working Tree Staging Area Working Directory (prod) tree2
  • 27. 28 © 2018 Brent Laster@BrentCLaster 28 @BrentCLaster Command: Subtree § Purpose - Allows including a copy of a separate repository with your current repository § Use case - include a copy of a Git repository for one or more dependencies along with the original repository for a project § Syntax § Notes § No links like a submodule - just a copy in a subdirectory § Advantage - no links to maintain § Disadvantage - extra content to carry around with your project git subtree add -P <prefix> <commit> git subtree add -P <prefix> <repository> <ref> git subtree pull -P <prefix> <repository> <ref> git subtree push -P <prefix> <repository> <ref> git subtree merge -P <prefix> <commit> git subtree split -P <prefix> [OPTIONS] [<commit>]
  • 28. 29 © 2018 Brent Laster@BrentCLaster 29 @BrentCLaster Subtrees - overall view
  • 29. 30 © 2018 Brent Laster@BrentCLaster 30 @BrentCLaster Subtrees - adding a project as a subtree § Simplest form, specify: prefix, remote path to repository, branch (optional) § Suppose we clone down a project - myproject § And, on the remote side, we have another project, subproj. § Now, we can add subproj as a subtree of myproject (--prefix subproject). § Subtree now shows subproject in structure and history
  • 30. 31 © 2018 Brent Laster@BrentCLaster 31 @BrentCLaster Command: (Interactive) Rebase § Purpose - allows you to run operations against commits in the git history § Use case - you need to make some kind of modification to one or more commits in the repository (rewrite history) § Syntax § Notes - creates an interactive script/batch file to modify commits § Cautions - don’t use this on anything already pushed
  • 31. 32 © 2018 Brent Laster@BrentCLaster 32 @BrentCLaster Interactive Rebase § Choose set of commits § Initiate interactive rebase § Git presents initial script § Modify commands (save and exit) § Act on prompts § Commits are updated
  • 32. 33 © 2018 Brent Laster@BrentCLaster 33 @BrentCLaster Command: Notes § Purpose - Add additional information to objects in the Git repository or look at such information § Use case - At some point after making a commit, you may decide that there are additional comments or other non-code information that you’d like to add with the commit - without changing the commit itself. § Syntax git notes [list [<object>]] git notes add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [--allow-empty] [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes-ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>…] git notes prune [-n | -v] git notes get-ref
  • 33. 34 © 2018 Brent Laster@BrentCLaster 34 @BrentCLaster Notes § Create a note § Create a note in a custom namespace (add --ref) § View a note (for a specific revision) § List notes in log
  • 34. 35 © 2018 Brent Laster@BrentCLaster 35 @BrentCLaster Command: grep § Purpose - provides a convenient (and probably familiar) way to search for regular expressions in your local Git environment. § Use case - self-explanatory § Syntax git grep [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] [-v | --invert-match] [-h|-H] [--full-name] [-E | --extended-regexp] [-G | --basic-regexp] [-P | --perl-regexp] [-F | --fixed-strings] [-n | --line-number] [-l | --files-with-matches] [-L | --files-without-match] [(-O | --open-files-in-pager) [<pager>]] [-z | --null] [-c | --count] [--all-match] [-q | --quiet] [--max-depth <depth>] [--color[=<when>] | --no-color] [--break] [--heading] [-p | --show-function] [-A <post-context>] [-B <pre-context>] [-C <context>] [-W | --function-context] [--threads <num>] [-f <file>] [-e] <pattern> [--and|--or|--not|(|)|-e <pattern>…] [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>…] [--] [<pathspec>…] § Notes § Several options are similar to OS grep options
  • 35. 36 © 2018 Brent Laster@BrentCLaster 36 @BrentCLaster grep § Default behavior - search for all instances of an expression across all tracked files in working directory § Search for all instances off expression “database” across all java files (note use of -- ) § -p option tells Git to try and show header of method or function where search target was found § --break - make output easier to read § --heading - prints filename above output § boolean operators § search in staging area § search in specific commit(s)
  • 36. 37 © 2018 Brent Laster@BrentCLaster 37 That’s all - thanks!