From 4ec9063e0cfb804ada851ba16dbbc3c790313668 Mon Sep 17 00:00:00 2001 From: Annika Lauber Date: Thu, 23 Mar 2023 14:55:14 +0100 Subject: [PATCH] Use .txt extensions for all files --- beginner/Exercise_1/Exercise_1.ipynb | 18 +++--- beginner/Exercise_2/Exercise_2.ipynb | 32 +++++----- beginner/Exercise_3/Exercise_3.ipynb | 28 ++++----- beginner/Exercise_5/Exercise_5.ipynb | 10 +-- beginner/Exercise_6/Exercise_6.ipynb | 22 +++---- beginner/Exercise_7/Exercise_7.ipynb | 6 +- .../{schedule_day1 => schedule_day1.txt} | 0 .../{schedule_day2 => schedule_day2.txt} | 0 beginner/helpers.sh | 62 +++++++++---------- 9 files changed, 83 insertions(+), 95 deletions(-) rename beginner/examples/{schedule_day1 => schedule_day1.txt} (100%) rename beginner/examples/{schedule_day2 => schedule_day2.txt} (100%) diff --git a/beginner/Exercise_1/Exercise_1.ipynb b/beginner/Exercise_1/Exercise_1.ipynb index cd4d475..186824a 100644 --- a/beginner/Exercise_1/Exercise_1.ipynb +++ b/beginner/Exercise_1/Exercise_1.ipynb @@ -190,8 +190,8 @@ "metadata": {}, "outputs": [], "source": [ - "# create a new file using the echo-command\n", - "# echo \"\" > first_file\n" + "# create a text file using the echo-command\n", + "# echo \"\" > first_file.txt\n" ] }, { @@ -229,8 +229,8 @@ "\n", "Untracked files:\n", " (use \"git add ...\" to include in what will be committed)\n", - "\tfirst_file\n", - "\tsecond_file\n", + "\tfirst_file.txt\n", + "\tsecond_file.txt\n", "\n", "nothing added to commit but untracked files present (use \"git add\" to track)\n", "```\n", @@ -265,8 +265,8 @@ "\n", "Changes to be committed:\n", " (use \"git rm --cached ...\" to unstage)\n", - "\tnew file: first_file\n", - "\tnew file: second_file\n", + "\tnew file: first_file.txt\n", + "\tnew file: second_file.txt\n", "```\n", "\n", "The last thing to do is to commit these files. " @@ -329,7 +329,7 @@ "Changes not staged for commit:\n", " (use \"git add ...\" to update what will be committed)\n", " (use \"git restore ...\" to discard changes in working directory)\n", - "\tmodified: first_file\n", + "\tmodified: first_file.txt\n", "\n", "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n", "```\n", @@ -359,8 +359,8 @@ "```\n", "diff --git a/first_file b/first_file\n", "index 3829ab8..a32d2f3 100644\n", - "--- a/first_file\n", - "+++ b/first_file\n", + "--- a/first_file.txt\n", + "+++ b/first_file.txt\n", "@@ -1 +1,2 @@\n", " myfirstline\n", "+mysecondline\n", diff --git a/beginner/Exercise_2/Exercise_2.ipynb b/beginner/Exercise_2/Exercise_2.ipynb index 5b04391..33d9446 100644 --- a/beginner/Exercise_2/Exercise_2.ipynb +++ b/beginner/Exercise_2/Exercise_2.ipynb @@ -12,13 +12,13 @@ " * Note: `git checkout` can be used as an alternative for `git switch`. However, it has some other functionalities, which led to confusion among users in the past. Therefore, we will not use it here but show the alternative commands in brackets.\n", "\n", "## Structure\n", - "In this exercise we will work on planning a two-day conference with two files containing the schedules for day 1 and 2 (schedule_day1 and schedule_day2). For adding events to the schedules (e.g., planned talks, poster sessions, etc.), we work on separate branches to not mix things up.\n", + "In this exercise we will work on planning a two-day conference with two files containing the schedules for day 1 and 2 (schedule_day1.txt and schedule_day2.txt). For adding events to the schedules (e.g., planned talks, poster sessions, etc.), we work on separate branches to not mix things up.\n", "Again, the exercise consists of short descriptions about a specific Git command, followed by a practical part where you can execute appropriate Git commands.\n", "\n", "In order to allow a smooth exercise, there are some functions written by C2SM in the file *helpers.sh* that are **NOT** part of Git. For this exercise we use the following functions from that file:\n", " * **init_exercise:** It will create the *work* directory and navigate into it \n", " * **reset:** It will delete the *work* folder and enable you a clean restart of the exercise in case you completely mess it up\n", - " * **init_simple_repo:** setup a Git repository containing a first version of schedule_day1 and schedule_day2 on branch *main*.\n", + " * **init_simple_repo:** setup a Git repository containing a first version of schedule_day1.txt and schedule_day2.txt on branch *main*.\n", " \n", "_**Reminder:** all text enclosed with `<>` denotes a placeholder to be replaced by a specific string appropriate to your context._\n", "\n", @@ -84,8 +84,8 @@ "\n", "### Learn how to work with branches and switch between them using git switch\n", "In the output above we see two files:\n", - " * schedule_day1\n", - " * schedule_day2\n", + " * schedule_day1.txt\n", + " * schedule_day2.txt\n", " \n", "Let's first have a look at them using the *cat* command:" ] @@ -108,7 +108,7 @@ "metadata": {}, "outputs": [], "source": [ - "# display content with cat: \"cat \"\n" + "# display content with cat: \"cat \"\n" ] }, { @@ -119,7 +119,7 @@ "As you see, there is still a lot of free time available to add talks, poster sessions, breaks etc.\n", "\n", "To keep everything in order we do this in two different Git branches:\n", - "one each for schedule_day1 and schedule_day2. \n", + "one each for schedule_day1.txt and schedule_day2.txt. \n", "\n", "**So let's start!**" ] @@ -143,7 +143,7 @@ "source": [ "From now on, we do all modifications of the schedules directly via Jupyter Notebooks.\n", " * On the start page go to folder *~/Exercise_2/work/conference_planning*\n", - " * Open *schedule_day1*\n", + " * Open *schedule_day1.txt*\n", " * Add more information to the schedule, i.e., a planned talk or lunch\n", " \n", "**Do not forget to save your modifications before coming back!**\n", @@ -158,7 +158,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Make changes to schedule_day1\n" + "# Make changes to schedule_day1.txt\n" ] }, { @@ -182,7 +182,7 @@ "Changes not staged for commit:\n", " (use \"git add ...\" to update what will be committed)\n", " (use \"git restore ...\" to discard changes in working directory)\n", - "\tmodified: schedule_day1\n", + "\tmodified: schedule_day1.txt\n", "\n", "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n", "```\n", @@ -197,7 +197,7 @@ "metadata": {}, "outputs": [], "source": [ - "# add schedule_day1 and commit it\n" + "# add schedule_day1.txt and commit it\n" ] }, { @@ -245,7 +245,7 @@ "id": "adjacent-angle", "metadata": {}, "source": [ - "Create a new branch for planning day 2 and extend the schedule_day2 in that branch similar as already done for schedule_day1" + "Create a new branch for planning day 2 and extend the schedule_day2.txt in that branch similar as already done for schedule_day1.txt." ] }, { @@ -255,7 +255,7 @@ "metadata": {}, "outputs": [], "source": [ - "# create a new branch and edit schedule_day2\n" + "# create a new branch and edit schedule_day2.txt\n" ] }, { @@ -292,9 +292,9 @@ "```\n", "\n", "Our Git repository now contains:\n", - " * Branch `` with modifications of schedule_day1\n", - " * Branch `` with modifications of schedule_day2\n", - " * Branch `main` with the initial version of schedule_day1 and schedule_day2\n", + " * Branch `` with modifications of schedule_day1.txt\n", + " * Branch `` with modifications of schedule_day2.txt\n", + " * Branch `main` with the initial version of schedule_day1.txt and schedule_day2.txt\n", " \n", "With `git switch` it is easy to jump between these branches and modify our schedules further.\n", "To show its capabilities we quickly switch between the branches and see how our schedules change.\n", @@ -309,7 +309,7 @@ "metadata": {}, "outputs": [], "source": [ - "# display the content of schedule_day1 and schedule_day2 using \"cat\"\n" + "# display the content of schedule_day1.txt and schedule_day2.txt using \"cat\"\n" ] }, { diff --git a/beginner/Exercise_3/Exercise_3.ipynb b/beginner/Exercise_3/Exercise_3.ipynb index 3032519..5d02ccc 100644 --- a/beginner/Exercise_3/Exercise_3.ipynb +++ b/beginner/Exercise_3/Exercise_3.ipynb @@ -13,7 +13,7 @@ " * Delete unused branches\n", " \n", "## Structure\n", - "In this exercise we will continue working on planning the two-day conference using schedule_day1 and schedule_day2 for planning each day. First we need to revert the schedules to a specific commit. Then we modify the same file, but in different branches. Finally, we merge all our changes into branch main.\n", + "In this exercise we will continue working on planning the two-day conference using schedule_day1.txt and schedule_day2.txt for planning each day. First we need to revert the schedules to a specific commit. Then we modify the same file, but in different branches. Finally, we merge all our changes into branch main.\n", "\n", "Again the exercise consists of short descriptions about a specific Git command (less detailed than in previous exercises), followed by a hands-on part for you to execute appropiate git commands.\n", "\n", @@ -105,7 +105,7 @@ "source": [ "To see the schedules or make changes we use the Jupyter Notebook again:\n", " * On the start page go to folder *~/Exercise_3/work/conference_planning*\n", - " * Open *schedule_day1* and *schedule_day2*\n", + " * Open *schedule_day1.txt* and *schedule_day2.txt*\n", " \n", "As you can see, the schedules of both days now start with talks.\n", "\n", @@ -119,7 +119,7 @@ "\n", "Simply execute `git restore --source= `.\n", "\n", - "Let's try it out for schedule_day1 first!" + "Let's try it out for schedule_day1.txt first!" ] }, { @@ -129,7 +129,7 @@ "metadata": {}, "outputs": [], "source": [ - "# restore the version of schedule_day1 before commit: \"Change poster sessions to talks\"\n", + "# restore the version of schedule_day1.txt before commit: \"Change poster sessions to talks\"\n", "# \"git restore --source= \"\n", "# (Alternative - includes 'git add': git checkout )\n" ] @@ -139,10 +139,10 @@ "id": "realistic-worship", "metadata": {}, "source": [ - "Refresh the jupyter notebook page showing schedule_day1 and have a look at it.\n", + "Refresh the jupyter notebook page showing schedule_day1.txt and have a look at it.\n", "You see, we now have a poster session in the morning again.\n", "\n", - "Do the same for schedule_day2." + "Do the same for schedule_day2.txt." ] }, { @@ -152,7 +152,7 @@ "metadata": {}, "outputs": [], "source": [ - "# restore schedule_day2 before commit \"Change poster sessions to talks\"\n" + "# restore schedule_day2.txt before commit \"Change poster sessions to talks\"\n" ] }, { @@ -185,7 +185,7 @@ "Every *commit hash* is unique, so you can always go to any version of the tracked files, *also* across different branches.\n", "\n", "All of a sudden we decide to not have the workshop on day 1 anymore. Therefore\n", - "restore schedule_day1 before the commit \"Add workshops\"" + "restore schedule_day1.txt before the commit \"Add workshops\"" ] }, { @@ -195,9 +195,9 @@ "metadata": {}, "outputs": [], "source": [ - "# restore schedule_day1 at right commit\n", + "# restore schedule_day1.txt at right commit\n", "\n", - "# commit schedule_day1\n" + "# commit schedule_day1.txt\n" ] }, { @@ -239,8 +239,8 @@ "metadata": {}, "source": [ "### Merge two branches (without merge conflicts)\n", - "In this part of the excercise we continue writing on *schedule_day1*.\n", - "There are two sections in schedule_day1 to modify in a seperate branch:\n", + "In this part of the excercise we continue writing on *schedule_day1.txt*.\n", + "There are two sections in schedule_day1.txt to modify in a seperate branch:\n", " * daily-program\n", " * evening activity\n", " \n", @@ -264,7 +264,7 @@ "source": [ "To edit the schedules use jupyter notebook as described before.\n", " \n", - "**Do not forget to save schedule_day1 before coming back here**" + "**Do not forget to save schedule_day1.txt before coming back here**" ] }, { @@ -399,7 +399,7 @@ "metadata": {}, "outputs": [], "source": [ - "# display content of schedule_day1 using \"cat\"\n" + "# display content of schedule_day1.txt using \"cat\"\n" ] }, { diff --git a/beginner/Exercise_5/Exercise_5.ipynb b/beginner/Exercise_5/Exercise_5.ipynb index 2e9b17f..4c8ca05 100644 --- a/beginner/Exercise_5/Exercise_5.ipynb +++ b/beginner/Exercise_5/Exercise_5.ipynb @@ -223,7 +223,7 @@ "Make a change in your local repository.\n", "Remember to do all modifications of the schedules directly via Jupyter Notebooks:\n", " * Go to folder *work* and enter *conference_planning*\n", - " * Open *schedule_day1*\n", + " * Open *schedule_day1.txt*\n", " * Add more information to your schedule, i.e. talks, workshops, etc.\n", " \n", "**Don't forget to save your modifications before coming back!**" @@ -302,14 +302,6 @@ " 1dacf13..80e64e8 updated_schedules -> updated_schedules\n", "```" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "aea143c9", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/beginner/Exercise_6/Exercise_6.ipynb b/beginner/Exercise_6/Exercise_6.ipynb index b133612..be6e392 100644 --- a/beginner/Exercise_6/Exercise_6.ipynb +++ b/beginner/Exercise_6/Exercise_6.ipynb @@ -21,7 +21,7 @@ "In order to allow a smooth exercise, there are some functions written by C2SM in the file *helpers.sh* that are **NOT** part of Git. For this exercise we use the following functions from that file:\n", " * **init_exercise:** It will create the *work* directory and navigate into it \n", " * **reset:** It will delete the *work* folder and enable you a clean restart of the exercise in case you completely mess it up\n", - " * **init_repo_remote:** setup a Git repository containing a first version of _schedule_day1_ and a remote repo containing the same version of _schedule_day1_ on a different branch called \"updated_schedules\".\n", + " * **init_repo_remote:** setup a Git repository containing a first version of _schedule_day1.txt_ and a remote repo containing the same version of _schedule_day1.txt_ on a different branch called \"updated_schedules\".\n", "\n", "_**Reminder:** all text enclosed with `<>` denotes a placeholder to be replaced by a specific string appropriate in your context._\n", "\n", @@ -85,7 +85,7 @@ "***\n", "## Exercise\n", "\n", - "In this exercise we are going to use a repository together with a remote repository containing the file _schedule_day1_. Let's initialize it with our helper function." + "In this exercise we are going to use a repository together with a remote repository containing the file _schedule_day1.txt_. Let's initialize it with our helper function." ] }, { @@ -107,7 +107,7 @@ "### Now let's make a change in the schedule and commit it\n", "Remember to do all modifications of the schedules directly via Jupyter Notebooks:\n", " * Go to folder ~*Exercise_6/work/conference_planning*\n", - " * Open _schedule_day1_\n", + " * Open _schedule_day1.txt_\n", " * Change the workshop to a poster session" ] }, @@ -166,7 +166,7 @@ "source": [ "### Now make a different change in the same file on the _updated_schedules_ branch\n", " * Switch to the _**updated_schedules**_ branch\n", - " * Change the workshop to a talk in ~*Exercise_6/work/conference_planning/schedule_day1*\n", + " * Change the workshop to a talk in ~*Exercise_6/work/conference_planning/schedule_day1.txt*\n", " * Commit your changes" ] }, @@ -220,13 +220,13 @@ "### Solve merge conflict\n", "If you've done everything \"right\", something has gone \"wrong\" and the output should look like the following:\n", "```\n", - "CONFLICT (content): Merge conflict in schedule_day1\n", + "CONFLICT (content): Merge conflict in schedule_day1.txt\n", "Automatic merge failed; fix conflicts and then commit the result.\n", "```\n", "\n", "We apparently run into a merge conflict. This happened because we did changes on the _**main**_ branch and the _**updated_schedules**_ branch at the same part of the file and Git doesn't know which changes it should take. Let's see how to solve this. \n", "\n", - "Have a look into the file _schedule_day1_. You will see something like this:\n", + "Have a look into the file _schedule_day1.txt_. You will see something like this:\n", "``` \n", "<<<<<<< HEAD\n", "13:30-15:00: Poster session\n", @@ -241,9 +241,9 @@ "\n", "1) If you are afraid that everything is messed up and you don't know what to do, just run ```git merge --abort``` and everything is set back to what it was before you were trying to merge.\n", "\n", - "2) You can adapt the file directly and delete the lines, which were added by the merge conflict except the lines you want to keep. Now the merge conflict is solved and you can add _schedule_day1_ and finally make a commit of the merge.\n", + "2) You can adapt the file directly and delete the lines, which were added by the merge conflict except the lines you want to keep. Now the merge conflict is solved and you can add _schedule_day1.txt_ and finally make a commit of the merge.\n", "\n", - "3) If you know you want to just use the file on the _**HEAD**_ branch (_ours_) or on the merging branch (_theirs_), you can select the preferred version with ```git restore schedule_day1 --ours``` or ```git restore schedule_day1 --theirs``` respectively. The restored file needs to be added before the final merge is being committed.\n", + "3) If you know you want to just use the file on the _**HEAD**_ branch (_ours_) or on the merging branch (_theirs_), you can select the preferred version with ```git restore schedule_day1.txt --ours``` or ```git restore schedule_day1.txt --theirs``` respectively. The restored file needs to be added before the final merge is being committed.\n", "\n", "Let's try all of the three versions!" ] @@ -301,7 +301,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Stage schedule_day1 and finalize the merge commit (don't forget to add a commit message)\n" + "# Stage schedule_day1.txt and finalize the merge commit (don't forget to add a commit message)\n" ] }, { @@ -358,7 +358,7 @@ "id": "58fe9568", "metadata": {}, "source": [ - "Now try to solve the merge conflict with ```git restore schedule_day1 --theirs/ours```." + "Now try to solve the merge conflict with ```git restore schedule_day1.txt --theirs/ours```." ] }, { @@ -387,7 +387,7 @@ "metadata": {}, "source": [ "### Merge conflict when trying to pull remote branch\n", - "We just realized that we forgot an introduction talk to the conference. Switch to the _**updated_schedules**_ branch and change the first event to \"Introduction\" in _~/conference_planning/schedule_day1_ and commit your changes." + "We just realized that we forgot an introduction talk to the conference. Switch to the _**updated_schedules**_ branch and change the first event to \"Introduction\" in _~/conference_planning/schedule_day1.txt_ and commit your changes." ] }, { diff --git a/beginner/Exercise_7/Exercise_7.ipynb b/beginner/Exercise_7/Exercise_7.ipynb index 4d3ca53..a7fc442 100644 --- a/beginner/Exercise_7/Exercise_7.ipynb +++ b/beginner/Exercise_7/Exercise_7.ipynb @@ -63,7 +63,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "4afe5a33", "metadata": {}, @@ -80,7 +79,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "c92c7dc6", "metadata": {}, @@ -163,7 +161,7 @@ "Make a change in your local repository.\n", "Remember to do all modifications of the schedules directly via Jupyter Notebooks.\n", " * Go to folder *work* and enter *git-example*\n", - " * Open *schedule_day1*\n", + " * Open *schedule_day1.txt*\n", " * Add more information to your schedule, i.e., workshops, talks, poster sessions, etc.\n", " \n", "**Don't forget to save your modifications before coming back!**" @@ -201,7 +199,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "278234da", "metadata": {}, @@ -237,7 +234,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "42a2eb3d", "metadata": {}, diff --git a/beginner/examples/schedule_day1 b/beginner/examples/schedule_day1.txt similarity index 100% rename from beginner/examples/schedule_day1 rename to beginner/examples/schedule_day1.txt diff --git a/beginner/examples/schedule_day2 b/beginner/examples/schedule_day2.txt similarity index 100% rename from beginner/examples/schedule_day2 rename to beginner/examples/schedule_day2.txt diff --git a/beginner/helpers.sh b/beginner/helpers.sh index 52b3f1c..3e44879 100755 --- a/beginner/helpers.sh +++ b/beginner/helpers.sh @@ -36,18 +36,18 @@ init_simple_repo () { mkdir -p conference_planning cd conference_planning git init - cp ../../../examples/schedule_day1 . - cp ../../../examples/schedule_day2 . + cp ../../../examples/schedule_day1.txt . + cp ../../../examples/schedule_day2.txt . - git add schedule_day1 && git commit -m "Add schedule_day1" - git add schedule_day2 && git commit -m "Add schedule_day2" + git add schedule_day1.txt && git commit -m "Add schedule_day1" + git add schedule_day2.txt && git commit -m "Add schedule_day2" - ed -s schedule_day1 <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null git add * && git commit -m "Add poster sessions in the morning" - ed -s schedule_day1 <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null git add * && git commit -m "Add coffee break" echo "" @@ -65,26 +65,26 @@ init_simple_repo_remote () { mkdir -p conference_planning cd conference_planning git init - cp ../../../examples/schedule_day1 . - cp ../../../examples/schedule_day2 . + cp ../../../examples/schedule_day1.txt . + cp ../../../examples/schedule_day2.txt . - git add schedule_day1 && git commit -m "Add schedule_day1" - git add schedule_day2 && git commit -m "Add schedule_day2" + git add schedule_day1.txt && git commit -m "Add schedule_day1" + git add schedule_day2.txt && git commit -m "Add schedule_day2" - ed -s schedule_day1 <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null git add * && git commit -m "Add poster sessions in the morning" - ed -s schedule_day1 <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null git add * && git commit -m "Add coffee breaks" cd .. git clone conference_planning conference_planning_remote cd conference_planning_remote git switch -c "updated_schedules" - ed -s schedule_day1 <<< $'/break/\na\n11:15-12:15: Talk professor A.\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/break/\na\n11:15-12:15: Talk professor B.\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/break/\na\n11:15-12:15: Talk professor A.\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/break/\na\n11:15-12:15: Talk professor B.\n.\nw\nq' > /dev/null git add * && git commit -m "update schedules" git switch main @@ -95,15 +95,15 @@ init_simple_repo_remote () { init_broken_repo () { init_simple_repo &> /dev/null - ed -s schedule_day1 <<< $'/break/\na\n11:15-12:15: Workshop ice crystal formation\n.\nw\nq' > /dev/null - ed -s schedule_day2 <<< $'/break/\na\n11:15-12:12: Workshop secondary ice\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/break/\na\n11:15-12:15: Workshop ice crystal formation\n.\nw\nq' > /dev/null + ed -s schedule_day2.txt <<< $'/break/\na\n11:15-12:12: Workshop secondary ice\n.\nw\nq' > /dev/null git add * && git commit -m "Add workshops" - sed 's/Poster session/Talk professor C./g' schedule_day1 > schedule_day1_tmp - sed 's/Poster session/Talk professor D./g' schedule_day2 > schedule_day2_tmp + sed 's/Poster session/Talk professor C./g' schedule_day1.txt > schedule_day1_tmp.txt + sed 's/Poster session/Talk professor D./g' schedule_day2.txt > schedule_day2_tmp.txt - mv -f schedule_day1_tmp schedule_day1 - mv -f schedule_day2_tmp schedule_day2 + mv -f schedule_day1_tmp.txt schedule_day1.txt + mv -f schedule_day2_tmp.txt schedule_day2.txt git add * && git commit -m "Change poster sessions to talks" @@ -122,17 +122,17 @@ init_repo_remote () { mkdir -p conference_planning cd conference_planning git init - cp ../../../examples/schedule_day1 . + cp ../../../examples/schedule_day1.txt . - git add schedule_day1 && git commit -m "Add schedule_day1" + git add schedule_day1.txt && git commit -m "Add schedule_day1" - ed -s schedule_day1 <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/program/\na\n09:00-11:00: Poster session\n.\nw\nq' > /dev/null git add * && git commit -m "Add poster sessions in the morning" - ed -s schedule_day1 <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/session/\na\n11:00-11:15: Coffee break\n.\nw\nq' > /dev/null git add * && git commit -m "Add coffee breaks" - ed -s schedule_day1 <<< $'/break/\na\n11:15-12:15: Talk professor A.\n12:15-13:30: Lunch\n13:30-15:00: Workshop\n15:00-16:00: Talk professor B.\n.\nw\nq' > /dev/null + ed -s schedule_day1.txt <<< $'/break/\na\n11:15-12:15: Talk professor A.\n12:15-13:30: Lunch\n13:30-15:00: Workshop\n15:00-16:00: Talk professor B.\n.\nw\nq' > /dev/null git add * && git commit -m "Add rest of daily program" cd .. @@ -148,8 +148,8 @@ init_repo_remote () { commit_to_remote_by_third_party() { cd ../conference_planning_remote git switch updated_schedules - sed 's/Poster session/Workshop/g' schedule_day1 > schedule_day1_tmp - mv -f schedule_day1_tmp schedule_day1 + sed 's/Poster session/Workshop/g' schedule_day1.txt > schedule_day1_tmp.txt + mv -f schedule_day1_tmp.txt schedule_day1.txt git add * && git commit -m "Workshop in the morning" git switch main cd -