Browse Source

update docs with new images

master
Charles Reid 2 years ago
parent
commit
697127878d
6 changed files with 49 additions and 17 deletions
  1. +4
    -1
      docs/branches.md
  2. +0
    -4
      docs/cherrypicking.md
  3. +4
    -1
      docs/easy.md
  4. +17
    -11
      docs/ohfk.md
  5. +23
    -0
      docs/transplant.md
  6. +1
    -0
      mkdocs.yml

+ 4
- 1
docs/branches.md View File

@@ -1,7 +1,10 @@
This page walks through a demonstration
git-commit-ectomy that you can perform
starting with an empty git repository.
It addresses the multi-branch case.

It addresses the **multi-branch case**.

![Painting: Morton and the First Use of Ether (Hinkley 1893).](img/william-morton-first-use-ether.jpg)

<br />
<br />


+ 0
- 4
docs/cherrypicking.md View File

@@ -1,4 +0,0 @@
# A Git-Commit-Ectomy the Hard Way: Cherry-Picking

(work in progress)


+ 4
- 1
docs/easy.md View File

@@ -1,7 +1,10 @@
This page walks through a demonstration
git-commit-ectomy that you can perform
starting with an empty git repository.
It addresses the single-branch case.

It addresses the **single-branch case**.

![Painting: The Agnew Clinic (Eakins 1889).](img/eakins-the-agnew-clinic-1889.jpg)

<br />
<br />


+ 17
- 11
docs/ohfk.md View File

@@ -1,18 +1,24 @@
# Oh F&!k: Please Send Backup

When you use the single-branch procedure
instead of the multi-branch procedure...
this is what happens.
![Painting: The Gross Clinic (Eakins 1875)](img/eakins-the-gross-clinic-1875.jpg)

Possible complications to all of this
include:
<br />
<br />

* Users who did not get the memo about rewriting the entire
history of the git reopsitory and did not clone a fresh
copy of the repo once the new history was pushed, and continue
to push the old history to the remote. (This can be proactively
dealt with by using branch protection, but you may need to
retroactively deal with this problem);
When you use the single-branch procedure
instead of the multi-branch procedure...
bad things happen.

Possible complications to all of this include:

* Users who did not get the memo about the entire history
of the repository being rewritten, who did not
listen when they were told to clone a fresh copy,
and who pushed directly to master even though
they were told repeatedly not to, so then you
end up with the entire old history being pushed
to the remote. (Deal with this proactively by
protecting the master branch!)

* Accidentally carrying out the procedure multiple times,
resulting in 2, 3, 4, even 5 copies of each commit,


+ 23
- 0
docs/transplant.md View File

@@ -0,0 +1,23 @@
# performing a transplant with patch

![Painting: The first successful kidney transplantation, Brigham Hospital, Harvard University, 1954.](img/first-successful-kidney-transplantation-brigham-1954-babb-1996.jpg)

<br />
<br />

if you are not able to save the branches as in the
[Multi-Branch Git-Commit-Ectomy Method](branches.md),
you can still save the changes that a particular
set of commits made to a particular file or set of
files using the `patch` utility together with `git`.

## creating patches with git

git has the ability to create patches using
`git-diff` and the `--patch` flag, which is the
default behavior.

```
git-diff --patch
```


+ 1
- 0
mkdocs.yml View File

@@ -26,6 +26,7 @@ nav:
- 'Index' : 'index.md'
- 'Git-Commit-Ectomy the Easy Way: Single Branch' : 'easy.md'
- 'Complications: Dealing with Branches' : 'branches.md'
- 'Performing Transplants with Patch' : 'transplant.md'
- 'Oh F&!k: Please Send Backup' : 'ohfk.md'

strict: true

Loading…
Cancel
Save