Compare commits
5 Commits
refactor-r
...
c39573573f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c39573573f | ||
|
|
ee67433fdd | ||
|
|
100e89b23d | ||
| b58080b8e8 | |||
| 2240cbe10d |
@@ -4,7 +4,7 @@
|
||||
|
||||
By the end of this module, you will:
|
||||
- Understand what cherry-picking is and how it works
|
||||
- Know when to use cherry-pick vs merge or rebase
|
||||
- Know when to use cherry-pick vs merge
|
||||
- Apply specific commits from one branch to another
|
||||
- Understand common use cases for cherry-picking
|
||||
- Learn how cherry-pick creates new commits with different hashes
|
||||
|
||||
@@ -34,7 +34,7 @@ Participants need:
|
||||
|
||||
---
|
||||
|
||||
## Pre-Workshop Setup
|
||||
## Setup
|
||||
|
||||
### Step 1: Add User Accounts
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Before starting, ensure you have:
|
||||
```
|
||||
|
||||
- **Azure DevOps account** with access to your organization/project
|
||||
- If you don't have one, create a free account at [dev.azure.com](https://dev.azure.com)
|
||||
- If you don't ask your organisation for an invitation
|
||||
|
||||
- **PowerShell 7+ or Bash terminal** for running commands
|
||||
```powershell
|
||||
@@ -46,14 +46,14 @@ Open your terminal and run:
|
||||
ssh-keygen -t rsa
|
||||
```
|
||||
|
||||
**Note about RSA:** Azure DevOps currently only supports RSA SSH keys. While newer algorithms like Ed25519 offer better security and performance, they are not yet supported by Azure DevOps. See the note at the end of this guide for more information.
|
||||
**Note about RSA:** Azure DevOps currently only supports RSA SSH keys. While newer algorithms like Ed25519 offer better security and performance, they are not yet supported by Azure DevOps.
|
||||
|
||||
### Save Location
|
||||
|
||||
When prompted for the file location, press `Enter` to accept the default:
|
||||
|
||||
```
|
||||
Enter file in which to save the key (/Users/yourname/.ssh/id_rsa):
|
||||
Enter file in which to save the key (C:\Users\YourName\.ssh\id_rsa):
|
||||
```
|
||||
|
||||
**Default locations:**
|
||||
|
||||
@@ -12,7 +12,6 @@ Learn to collaborate on a shared repository using:
|
||||
|
||||
```
|
||||
1. Create branch → 2. Make changes → 3. Push branch
|
||||
↓
|
||||
6. Delete branch ← 5. Merge PR ← 4. Create PR
|
||||
```
|
||||
|
||||
@@ -110,9 +109,15 @@ git pull
|
||||
|
||||
1. Both people should create a branch with changes to `feature-1` and `feature-2`, you task is to change the position of number 5. Where you place it is up to you.
|
||||
2. Now both people should push their respective branch `git push <the-branch>`
|
||||
3. Now merge `feature-1` branch first, going throught the Pull Request flow.
|
||||
1. Person A pushes their branch `git push feature-1`
|
||||
2. Person B pushes their branch `git push feature-2`
|
||||
3. Now merge `feature-1` branch first, going throught the Pull Request flow (see Step 5).
|
||||
4. Then merge `feature-2` branch second, and notice you'll get a MERGE CONFLICT.
|
||||
5. It is not the owner of `feature-2` branch to resolve the conflict. This is done by merge the `main` branch into `feature-2` locally and so the owner of `feature-2` has to do the following
|
||||
5. The owner of `feature-2` (Person B) is now tasked with resolving the conflict.
|
||||
|
||||
In order to solve merge conflicts through a Shared Server (Azure DevOps) you have to do merges in <q>reverse</q>, meaning: Instead of, like in module <q>03-branching-and-merging</q>, merging the feature-branch into the `main` branch, we merge the `main` branch into the feature branch.
|
||||
|
||||
Doing so ensures that the `main` branch maintains the integrity it's supposed to have and the conflicts are solved on the feature-branch side before being merged into the `main` branch. The idea here being that, we ONLY modify the main branch through merges facilitated (and reviewed) by Pull Requests. We want the `main` branch to be as stable as possible.
|
||||
```pwsh
|
||||
# First get the latest changes on main
|
||||
git switch main
|
||||
|
||||
50
install.ps1
50
install.ps1
@@ -1,35 +1,39 @@
|
||||
#!/usr/bin/env pwsh
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs all prerequisites for Git Workshop using winget and clones the repository.
|
||||
.SYNOPSIS
|
||||
Installs all prerequisites for Git Workshop using winget (which is a CLI
|
||||
tool to the Windows Package Manager Server) and clones the workshop
|
||||
repository.
|
||||
|
||||
.DESCRIPTION
|
||||
This script automates the installation of required tools for the Git Workshop:
|
||||
- PowerShell 7 (cross-platform PowerShell)
|
||||
- Git 2.23+ (version control system)
|
||||
- Visual Studio Code (code editor with Git integration)
|
||||
.DESCRIPTION
|
||||
This script automates the installation of required tools for the Git Workshop:
|
||||
- PowerShell 7 (cross-platform PowerShell)
|
||||
- Git 2.23+ (version control system)
|
||||
- Visual Studio Code (code editor with Git integration)
|
||||
|
||||
Optional tools (with user prompts):
|
||||
- Windows Terminal (modern terminal experience)
|
||||
Optional tools (with user prompts):
|
||||
- Windows Terminal (modern terminal experience)
|
||||
|
||||
The script checks for existing installations, shows clear progress, and verifies
|
||||
each installation succeeded. At the end, it clones the repository and can
|
||||
open it in VSCode for immediate workshop access.
|
||||
The script checks for existing installations, shows clear progress, and verifies
|
||||
each installation succeeded. At the end, it clones the repository and can
|
||||
open it in VSCode for immediate workshop access.
|
||||
|
||||
One-shot installation:
|
||||
Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
|
||||
One-shot installation:
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
|
||||
|
||||
.EXAMPLE
|
||||
PS> Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
|
||||
Runs the complete installation and setup in one command.
|
||||
.EXAMPLE
|
||||
PS> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
PS> Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
|
||||
Runs the complete installation and setup in one command.
|
||||
|
||||
.EXAMPLE
|
||||
PS> .\install.ps1
|
||||
Runs the installation script with interactive prompts.
|
||||
.EXAMPLE
|
||||
PS> .\install.ps1
|
||||
Runs the installation script with interactive prompts.
|
||||
|
||||
.NOTES
|
||||
Requires Windows 11 with winget (App Installer) available.
|
||||
Some installations may require administrator privileges.
|
||||
.NOTES
|
||||
Requires Windows 11 with winget (App Installer) available.
|
||||
Some installations may require administrator privileges.
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
|
||||
Reference in New Issue
Block a user