Commit 20d35ad5 authored by JackV's avatar JackV

Cleanup, type/formatting fixes

parent e17e09b3
Pipeline #461 passed with stage
in 2 minutes and 21 seconds
......@@ -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
![](assets/chisel.png)
![](assets/trowel.jpg)
---
......@@ -229,14 +232,14 @@ Possible operations:
---
## git filter-branch --index-filter
### `git filter-branch --index-filter`
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment