Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Merge conflict practice #84

Open
wants to merge 49 commits into
base: merge-conflict-practice
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
05b0302
Changes that conflict with Round2 Issues.
braughtg Nov 12, 2021
9ecaf33
build(kit): install features
Oct 30, 2022
80a6063
Remove echo of script contents.
braughtg Oct 30, 2022
98060b2
Do not print args during cmd execution.
braughtg Oct 30, 2022
85b8277
Do not display directory during execution.
braughtg Oct 30, 2022
a5df542
Typo Command fixed in INSTALL.me
JinLeeGG Nov 9, 2022
96b8180
Changed Issue #21 from 'is' to 'it'
thorpIV Nov 11, 2022
214e3c7
Under the Workflow heading changed the word fork into a link to offic…
Nov 12, 2022
4360b94
remove duplicate are in CONTRIBUTING.md
Nov 12, 2022
511764f
Complete the last sentence of FarmData2 School section
nmqng Nov 12, 2022
61a68d6
Changed starts to start to improve clarity
andrewscheiner53 Nov 13, 2022
df8b514
Added a between in and module in README
Le-byte Nov 13, 2022
4256010
Added hyphen to step by step in the CONTRIBUTING.md file
EliasBerhe Nov 13, 2022
61bf911
Change-It-To-Its-In-Licensing-Section
nathang15 Nov 13, 2022
38d0813
add missing 'with' between 'experiment' and 'FarmData2'
quannn22 Nov 13, 2022
e600040
Changed 'you' to 'your'
sidlamsal Nov 14, 2022
1c14f74
Added -that- between tutorial and walks in the Git Immersion bullet p…
udvale Nov 14, 2022
d42d935
added and replaced commas at the specified locations in CONTRIBUTING.md
pranavm2109 Nov 14, 2022
499b330
Typo 'ad' fixed
Melantha-Chen Nov 15, 2022
9263a1d
Added Pull Request Link
fredam2025 Nov 15, 2022
a0b3f4a
fixed following typo
vanskyhp Nov 16, 2022
334e363
Pluralize it (to 'its')for clarity
Mikek16 Nov 16, 2022
f8775b1
Fixed new Pull Request Link
fredam2025 Nov 16, 2022
a800285
fixing the syntax for manager, worker, and guess to be similar to admin
phong260702 Nov 16, 2022
ec53ad3
Fixed type ext to text
richmango03 Nov 16, 2022
fc45157
Pluralize Update (i.e Updates) for clarity in the first sentence of t…
Shahir-47 Nov 16, 2022
a0be95b
Merge pull request #49 from richmango03/FixMissingTType
braughtg Nov 16, 2022
1d827dd
Merge pull request #48 from Shahir-47/MakeUpdatePlural
braughtg Nov 16, 2022
2bc8ab0
Merge pull request #47 from phong260702/FormatRoleName
braughtg Nov 16, 2022
f3e5f78
Merge pull request #46 from Melantha-Chen/FixTypo
braughtg Nov 16, 2022
2ab2aa0
Merge pull request #45 from Mikek16/MakeItPlural
braughtg Nov 16, 2022
af99a08
Merge pull request #44 from fredam2025/AddPullRequestLink
braughtg Nov 16, 2022
8edba97
Merge pull request #43 from Foogabob/makeForkALink
braughtg Nov 16, 2022
e1614ea
Merge pull request #42 from pranavm2109/FixCommaUsageInContributing
braughtg Nov 16, 2022
a0c3982
Merge pull request #41 from udvale/AddMissing-That
braughtg Nov 16, 2022
d7a5884
Merge pull request #40 from sidlamsal/FixTypoInOnboarding
braughtg Nov 16, 2022
7bf376d
Merge pull request #39 from quannn22/FixTypoInReadme
braughtg Nov 16, 2022
ffb16e6
Merge pull request #38 from nathang15/Fix-Typo-In-Licensing-Section
braughtg Nov 16, 2022
49215fc
Merge pull request #37 from EliasBerhe/HypenateStepByStep
braughtg Nov 16, 2022
8d98f4c
Merge pull request #36 from Alexandrialexie/addAToReadMe
braughtg Nov 16, 2022
c0a2fcf
Merge pull request #35 from jamesng5/FixTruncatedSentenceInONBOARDING
braughtg Nov 16, 2022
b4cad92
Merge pull request #34 from andrewscheiner53/MakeStartsSingular
braughtg Nov 16, 2022
a4f5887
Merge pull request #33 from nguyenbanhducA1K51/fix#22
braughtg Nov 16, 2022
2860041
Merge pull request #32 from thorpIV/ChangeIsToIt
braughtg Nov 16, 2022
9450119
Merge pull request #31 from JinLeeGG/FixTypoInCommand
braughtg Nov 16, 2022
d3de604
Merge pull request #51 from vanskyhp/FixTypoInOnboarding
braughtg Nov 27, 2022
e8e18b4
Merge pull request #72 from dickinson-comp190/add-round-two-conflicts
braughtg Nov 30, 2022
bc3c6d0
done
phong260702 Dec 7, 2022
52e4feb
fix link api
phong260702 Dec 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/allow-anyone-to-self-assign-an-issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Allow anyone to self-assign an issue"

on: [issue_comment]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: bhermann/[email protected]
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
12 changes: 12 additions & 0 deletions .kit/features/0-display-welcome-message/install-into-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

echo "*********************************************************************"
printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n"
printf "(I'm in the 'kit' and communicate through your 'tty'\u00B9 - get it? \xF0\x9F\x98\x81)\n"
echo
echo "I am here to help you be successful in the GitKit activities."
echo "You will hear from me every once in a while when I think you"
echo "might need some help."
echo
printf "\u00B9To learn about the tty: https://itsfoss.com/what-is-tty-in-linux/\n"
echo "*********************************************************************"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From d008b798254a94457d7937dccd05e30ca1351ff8 Mon Sep 17 00:00:00 2001
From: Grant Braught <[email protected]>
Date: Fri, 12 Nov 2021 08:43:21 -0500
Subject: [PATCH] Conflicts for practicing merges with conflicts

Students can pull this branch and used it to practice resolving merge conflicts. It contains two merge conflicts with the 4 changes made in the addConflicts branch.
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 9d26f8e..26c2c3a 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic

### History ###

-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community.
+FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://a.different.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community.

### Acknowledgements ###

@@ -31,7 +31,7 @@ FarmData2 is powered by the farmOS open source project.
Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/).

The development of FarmData2 has received partial support from:
-* The GNOME Community Engagement Challenge:
+* The [GNOME Community Engagement Challenge](https://a.different.link3):
* [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png)
* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good.
* [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general).
--
2.36.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
git stash
git switch main
git switch -c add-conflicts-for-practicing-merges-with-conflicts
git am "${SCRIPT_DIR}"/*.patch
git switch main
git stash pop
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 8d03822daf8d30fc192b4543d7992ee0b0ea099e Mon Sep 17 00:00:00 2001
From: Grant Braught <[email protected]>
Date: Fri, 12 Nov 2021 08:37:19 -0500
Subject: [PATCH] Changes that conflict with Round2 Issues.

Each of the 190-Round2 issues in the issue tracker add links to the README.md file. This commit, when merged into main will introduce changes that conflict with all of the changes requested by those issues. It should be merged after students synch with main and as or just after they submit their PR's for the 190-Round2 issues.
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 9d26f8e..efb70b6 100644
--- a/README.md
+++ b/README.md
@@ -22,18 +22,18 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic

### History ###

-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community.
+FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://not.the.right.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community.

### Acknowledgements ###

-FarmData2 is powered by the farmOS open source project.
+FarmData2 is powered by the [farmOS](https://not.the.right.link2) open source project.

Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/).

The development of FarmData2 has received partial support from:
-* The GNOME Community Engagement Challenge:
+* The [GNOME Community Engagement Challenge](https://not.the.right.link3):
* [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png)
-* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good.
+* The National Science Foundation ([DUE-2013069](https://not.the.right.link4)) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good.
* [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general).

---
--
2.36.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
git stash
git switch main
git switch -c add-round-two-conflicts
git am "${SCRIPT_DIR}"/*.patch
git switch main
git stash pop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Allow anyone to self-assign an issue"

on: [issue_comment]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: bhermann/[email protected]
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

## This script is called after the new instance has been created and
## initialiazed. It runs in the local clone of the instance.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

set -e

project_dir="$(
while [[ ! -d .git ]] ; do
cd ..
done
pwd
)"
workflows_dir="${project_dir}/.github/workflows"
mkdir -p "$workflows_dir"
cp "$SCRIPT_DIR/allow-anyone-to-self-assign-an-issue.yaml" "$workflows_dir"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

## This script is called once after the instance is cloned by a KitClient.
## It runs in the clone of the instance in a KitClient.

git config --local branch.main.mergeoptions "--no-ff"
85 changes: 85 additions & 0 deletions .kit/features/5-detect-upstream-clone/install-into-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/usr/bin/env bash

## This script is called once after the instance is cloned by a KitClient.
## It runs in the clone of the instance in a KitClient.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

# shellcheck disable=SC1091
source "${SCRIPT_DIR}/upstream-location.sh"

function main() {
detect-upstream-clone
}

function detect-upstream-clone() {
upstream="$(load-upstream-location)"
origin="$(get-origin-location)"

# Case insensitive check.
upstream="$(echo "$upstream" | tr '[:upper:]' '[:lower:]')"
origin="$(echo "$origin" | tr '[:upper:]' '[:lower:]')"
if [[ "$origin" == "$upstream" ]] ; then
display-error-message
fi
}

function get-origin-location() {
convert-url-to-org-repo "$(get-origin-url)"
}

function get-origin-url() {
git remote get-url origin
}

function convert-url-to-org-repo() {
url="$1"
if [[ "$url" =~ ^git.* ]] ; then
convert-git-url-to-org-repo "$url"
else
convert-http-url-to-org-repo "$url"
fi
}

function convert-git-url-to-org-repo() {
url="$1"
url="$(remove-prefix-to-first-colon "$url")"
url="$(remove-suffix-dot-git "$url")"
echo "$url"
}

function convert-http-url-to-org-repo() {
url="$1"
url="$(remove-prefix-http "$url")"
url="$(remove-suffix-dot-git "$url")"
echo "$url"
}

function remove-prefix-to-first-colon() {
echo "${1#*:}"
}

function remove-suffix-dot-git() {
echo "${1%.git}"
}

function remove-prefix-http() {
local url="${1}"
url="${url#*//}"
echo "${url#*/}"
}

function display-error-message() {
echo "*********************************************************************"
printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n"
echo
echo "Oops, I think you have cloned the upstream repository instead of your"
echo "fork. But don't worry. You can fix it!"
echo
echo "1. Delete your local repository."
echo "2. Navigate to your fork on GitHub and copy its clone URL."
echo "3. Clone your fork using its clone URL."
echo "*********************************************************************"
}

main
50 changes: 50 additions & 0 deletions .kit/features/5-detect-upstream-clone/install-into-instance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

## This script is called after the new instance has been created and
## initialiazed. It runs in the local clone of the instance.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

source "${SCRIPT_DIR}/upstream-location.sh"

function main() {
save-upstream-location "$(get-upstream-location)"
}

function get-upstream-location() {
get-origin-location
}

function get-origin-location() {
convert-url-to-org-repo "$(get-origin-url)"
}

function get-origin-url() {
git remote get-url origin
}

function convert-url-to-org-repo() {
local n="$1"
if [[ "$n" =~ ^git.* ]] ; then
# remove [email protected] prefix
n="${n#[email protected]:}"
else
# remove https://github.com/ prefix
n="${n#https://*github.com/}"
fi
# remove .git suffix
n="${n%.git}"
echo "$n"
}

function get-upstream-location-file() {
echo "$SCRIPT_DIR/upstream-location.txt"
}

function commit-and-push-upstream-location() {
git add "$(get-upstream-location-file)"
git commit -m "build(kit): add upstream location"
git push
}

main
11 changes: 11 additions & 0 deletions .kit/features/5-detect-upstream-clone/upstream-location.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

save-upstream-location() {
echo "${1}" > "${SCRIPT_DIR}/upstream-location.txt"
}

load-upstream-location() {
cat "${SCRIPT_DIR}/upstream-location.txt"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dickinson-comp190/GitKit-FarmData2
10 changes: 10 additions & 0 deletions .kit/features/5-prevent-commit-to-main/install-into-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

## This script is called once after the instance is cloned by a KitClient.
## It runs in the clone of the instance in a KitClient.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
PROJECT_DIR="$(git rev-parse --show-toplevel)"

cp "$SCRIPT_DIR/prevent-commit-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-commit"
chmod +x "$PROJECT_DIR/.git/hooks/pre-commit"
28 changes: 28 additions & 0 deletions .kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# Hook to verify that commits are not made to the main branch accidentally
# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no

if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]]
then
echo "**********************************************************************"
printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n"
echo "You should not be committing to the main branch."
echo "You should be committing to a feature branch."
echo
echo "Here's how:"
echo
echo "1. Create a feature branch, if you don't already have one."
echo
echo " git branch <branchname>"
echo
echo "2. Switch to that branch."
echo
echo " git switch <branchname>"
echo
echo "3. Retry your commit."
echo
echo "That's it! Have fun! Meow!"
echo "**********************************************************************"
exit 1
fi
10 changes: 10 additions & 0 deletions .kit/features/5-prevent-merge-to-main/install-into-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

## This script is called once after the instance is cloned by a KitClient.
## It runs in the clone of the instance in a KitClient.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
PROJECT_DIR="$(git rev-parse --show-toplevel)"

cp "$SCRIPT_DIR/prevent-merge-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-merge-commit"
chmod +x "$PROJECT_DIR/.git/hooks/pre-merge-commit"
21 changes: 21 additions & 0 deletions .kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Hook to verify that commits are not made to the main branch accidentally
# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no

if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]]
then
echo "**********************************************************************"
printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n"
echo "You should not be merging to the main branch."
echo "You should only be merging in a GitHub pull request."
echo "The working tree is still in a merging state."
echo
echo "Before continuing, run the command:"
echo
echo " git reset --merge"
echo
echo "Ignore messages after this line"
echo "**********************************************************************"
exit 1
fi
10 changes: 10 additions & 0 deletions .kit/features/5-prevent-rebase/install-into-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

## This script is called once after the instance is cloned by a KitClient.
## It runs in the clone of the instance in a KitClient.

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
PROJECT_DIR="$(git rev-parse --show-toplevel)"

cp "$SCRIPT_DIR/prevent-rebase.sh" "$PROJECT_DIR/.git/hooks/pre-rebase"
chmod +x "$PROJECT_DIR/.git/hooks/pre-rebase"
Loading