Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
disaster_recovery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Corsi
Slides Corsi Git
disaster_recovery
Commits
20d35ad5
Commit
20d35ad5
authored
Mar 22, 2020
by
JackV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup, type/formatting fixes
parent
e17e09b3
Pipeline
#461
passed with stage
in 2 minutes and 21 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
assets/chisel.png
assets/chisel.png
+0
-0
assets/git_fire.png
assets/git_fire.png
+0
-0
assets/trowel.jpg
assets/trowel.jpg
+0
-0
slides/content.md
slides/content.md
+12
-9
No files found.
assets/chisel.png
deleted
100644 → 0
View file @
e17e09b3
39.1 KB
assets/git_fire.png
deleted
100644 → 0
View file @
e17e09b3
45.7 KB
assets/trowel.jpg
0 → 100644
View file @
20d35ad5
23.5 KB
slides/content.md
View file @
20d35ad5
...
...
@@ -47,7 +47,7 @@ It is composed of:
*
One (or more) father sha1s
*
None or more file diffs
Generally a commit represents a 'snapshot' of all the project
files
A commit can also be seen as a 'snapshot' of all of the project's
files
---
...
...
@@ -77,10 +77,12 @@ Generally this means your repo on github/gitlab/gitea/etc.
There are 2 types of branches:
*
Local branches (es.
**master**
)
*
Remote branches (es.
**origin/master**
)
A local branch can __track__ a remote branch, which means that
*
**push**
es from the local branch will go to the tracked remote branch
*
**pull**
s will be merged to the tracking branch
By default when you
`git clone`
git sets up the
`master`
branch to track
`origin/master`
By default when you
**`git clone`**
git sets up the _master_ branch to track _origin/master_
---
...
...
@@ -97,14 +99,15 @@ By default when you `git clone` git sets up the `master` branch to track `origin
We say that a branch A is fast-forwardable w.r.t. branch B iff
there is no bifurcation between A and B.
Why is this important?
*
A merge of a fast-forwardable branch always succeeds (just move B to point to A)
*
A merge of a fast-forwardable branch always succeeds (just move B to point to A
's commit
)
*
**git pull**
and
**git push**
do not break only on fast forwardable branches (e.g. _master_ and _origin/master_)
---
## Forcing a push on a non-ff branch
If you have a branch that has diverged, you need to use
**`git push --force`**
If you have a branch that has diverged, you need to use
**`git push --force`**
Note that once you do this, every person that has cloned your repo will need
to
**`git pull --force`**
and probably come to your house with torch and pitchfork.
**tl;dr `git push --force` responsibly**
...
...
@@ -124,7 +127,7 @@ to **`git pull --force`** and probably come to your house with torch and pitchfo
----
## amending commits


---
...
...
@@ -210,7 +213,7 @@ Rebase can also be used to touch-up a commit history
**`git rebase -i <end commit>`**
Once run a file will be opened with __$EDITOR__
Once run a file will be opened with __$EDITOR__
Possible operations:
*
reword: change the commit message
*
edit: change the file just before they were committed
...
...
@@ -229,14 +232,14 @@ Possible operations:
---
##
git filter-branch --index-filter
##
# `git filter-branch --index-filter`
Allows to apply changes only to the index
Allows to apply changes only to the index
(basically only
*git*
commands are allowed)
---
##
git filter-branch --tree-filter
##
# `git filter-branch --tree-filter`
Allows us to run multiple commands on each commit
(it is much slower than index-filter since each individual commit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment