From 1dcd6eb58f60ba2080d2569abe71575f2ade7893 Mon Sep 17 00:00:00 2001 From: jsimonrichard Date: Sun, 19 Jan 2025 01:17:28 +0000 Subject: [PATCH] deploy: 5f2962738e0c584808992a0cca378e01a961d00b --- ch2-git.html | 4 ++-- ch2.2-using-git.html | 18 +++++++++++++++++- cheat-sheet.html | 5 ++++- print.html | 25 ++++++++++++++++++++++--- searchindex.js | 2 +- searchindex.json | 2 +- toc.html | 2 +- toc.js | 2 +- 8 files changed, 49 insertions(+), 11 deletions(-) diff --git a/ch2-git.html b/ch2-git.html index 2f47087..ac53627 100644 --- a/ch2-git.html +++ b/ch2-git.html @@ -3,7 +3,7 @@ - What is Git? - The CPT's Linux / Git Workshop + What is git? - The CPT's Linux / Git Workshop @@ -160,7 +160,7 @@

The CPT's Linux / Git Workshop

-

What is Git?

+

What is git?

Git is a version control system (VCS), which means that it saves, compares, and manages changes to files (usually code files) over time.

This may seem innocuous, but it's actually vital to the development cycle. Virtually all professional code is managed by some VCS, and git is by far the most common.

Use cases

diff --git a/ch2.2-using-git.html b/ch2.2-using-git.html index 5f4403f..6d7e4a1 100644 --- a/ch2.2-using-git.html +++ b/ch2.2-using-git.html @@ -194,7 +194,7 @@

Merging bra

and then run the git merge command.

git merge branch_a
 
-

If the files modified in main and branch_a (after branch_a was created or after the last merge) are mutually exclusive, then git should be able to do this automatically. However, if the same file was modified in both branches, you probably encounter this:

+

If the files modified in main and branch_a (after branch_a was created or after the last merge) are mutually exclusive, then git should be able to do this automatically. However, if the same file was modified in both branches, you will probably encounter this:

CONFLICT (content): Merge conflict in my_file.txt
 Automatic merge failed; fix conflicts and then commit the result.
 
@@ -208,6 +208,22 @@

Merging bra

To resolve this, replace the text above with the final desired version (it could be one or the other, or a combination of both). Once you've resolved all of the conflicts in (and saved) each file, stage the files and create a new commit. This completes the merge process.

Afterwards, you may delete branch_a.

git branch -d branch_a
+
+

Troubleshooting: Merging with remote branches

+
From github.com:gaverkov/mixed_volumes_proposal
+ * branch            main       -> FETCH_HEA
+hint: You have divergent branches and need to specify how to reconcile them.
+hint: You can do so by running one of the following commands sometime before
+hint: your next pull:
+hint:
+hint:   git config pull.rebase false  # merge
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint:
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
 

diff --git a/cheat-sheet.html b/cheat-sheet.html index 15eb281..a48b396 100644 --- a/cheat-sheet.html +++ b/cheat-sheet.html @@ -160,7 +160,10 @@

The CPT's Linux / Git Workshop

- +

Cheat Sheet

+

Basic Linux Commands

+

Git commands

+