From 4e265215b352c6e095788185d34859e0b6932652 Mon Sep 17 00:00:00 2001 From: Ekaterina Date: Sun, 1 Sep 2024 08:48:35 +0300 Subject: [PATCH 1/3] Added submission 1 file --- submission1.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 submission1.md diff --git a/submission1.md b/submission1.md new file mode 100644 index 0000000..4067c5b --- /dev/null +++ b/submission1.md @@ -0,0 +1,23 @@ +**Signing commits is a security practice in Git.** + +The most common commit signing techniques include ***SSH, GPG, and S/MIME.*** +They are primarily used for authorship verification, allowing contributors to verify the authorship of commits (prove that the commit were indeed made by them). + +Sign tags or commits that are marked as verified assure others that the changes come from a trusted source. + + +This practice is especially beneficial since it enforces: + +1. **Trustable integrity assurance** + +A signed commit guarantess that since you made a commit, no one can modify it (if someone tries to alter a signed commit, the signature will become invalid). + + +2. **Compliance with security policies** + +This is important in industrial and commercial projects with strict security standards. + +3. **Improved collaboration** + +This is crucial, for example, in open-source and collaborative projects. + From b64c4ca465211d60a7fbea746f718690323f52ce Mon Sep 17 00:00:00 2001 From: Ekaterina Date: Sun, 1 Sep 2024 10:03:34 +0300 Subject: [PATCH 2/3] Added task2 to lab1 --- submission1.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/submission1.md b/submission1.md index 4067c5b..d361eec 100644 --- a/submission1.md +++ b/submission1.md @@ -1,3 +1,5 @@ +# Task 1: SSH Commit Signature Verification + **Signing commits is a security practice in Git.** The most common commit signing techniques include ***SSH, GPG, and S/MIME.*** @@ -21,3 +23,48 @@ This is important in industrial and commercial projects with strict security sta This is crucial, for example, in open-source and collaborative projects. +# Task 2: Merge Strategies in Git + +- **Merge happens when combining several branches.** + +- Merge commit is a regular commit which just happens to have several parent commits. + +## Merge strategies + +**Explicit merges** + +### Standard Merge + +The commits of branch A are added to the branch B. A new commit is created. A new **merge commit** is created. The commit history of A becomes a part of B's commit history. + + +**Pros:** +- Commit history of A is preserved and remains unchanged. +- The merge commit clearly shows where branches were combined. + +**Cons:** +- History might become messy, especially when many feature branches are merged frequently. + +### Squash and Merge + +This technique squashes all the commits from the feature branch before merging (commit history of this branch is combined into a single commit). + +**Pros:** +- The commit history in the base branch remains linear and clear since only a single commit is added for each feature/fix. + + +**Cons:** +- The detailed history of individual commits in the feature branch is lost after squashing. + + +### Rebase and Merge + +Rewrites the commit history of the feature branch, placing it on the top of the main branch, making its commit history linear. Reapplies comits from a feature branch onto the base branch. + +**Pros:** +- Creates a clean, linear history without merge commits, which is easier to follow. + +**Cons:** +- Rebase alters the commit hashes, which can lead to confusion and conflicts if not managed carefully. + +While Squash and Merge and Rebase and Merge are better suited for specific use cases when a clean history is more important than preserving every detail of the development process, the **Standard Merge strategy** is often preferred in collaborative environments. Standard Merge strategy has a significant advantage of maintaining unaltered, transparent history of all commits. These advantages make it easier for contributors to debug, fix features effectively. It is a safer and more straightforward approach. \ No newline at end of file From 93fcec684eb41989ea172dd71e644ed220590103 Mon Sep 17 00:00:00 2001 From: Ekaterina Date: Sun, 1 Sep 2024 10:31:51 +0300 Subject: [PATCH 3/3] Update lab1 --- submission1.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/submission1.md b/submission1.md index d361eec..c2ec084 100644 --- a/submission1.md +++ b/submission1.md @@ -31,8 +31,6 @@ This is crucial, for example, in open-source and collaborative projects. ## Merge strategies -**Explicit merges** - ### Standard Merge The commits of branch A are added to the branch B. A new commit is created. A new **merge commit** is created. The commit history of A becomes a part of B's commit history.