From 3f15cac39f07404e5afb4386dd4778019d313e67 Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Fri, 8 Sep 2023 11:46:49 +0530 Subject: [PATCH 01/15] add challenge 8 --- Challenges/challenge8.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Challenges/challenge8.md diff --git a/Challenges/challenge8.md b/Challenges/challenge8.md new file mode 100644 index 000000000..ab4478feb --- /dev/null +++ b/Challenges/challenge8.md @@ -0,0 +1,35 @@ +## Welcome to Challenge 8 + +Congratulations on successfully completing the 7th challenge! This marks the completion of the first milestone of the challenge. + +Before you proceed with the 8th challenge, ensure you are required to have completed the following tasks to successfully mark the completion of the 1st milestone: + +## Preqrequisites to mark completion of 1st Checkpoint (Milestone): + +1. Use the creative shared for the successful completion of the first milestone: [First Milestone Creative](https://github-production-user-asset-6210df.s3.amazonaws.com/19529592/266515279-9696f91e-138d-44b0-b42b-08c5e679f4ac.jpg) to share on any social platform: LinkedIn, Twitter, Facebook, Instagram, etc. marking the completion of the first milestone. + +2. Fill the Google form the following Google form: [Google Form](https://forms.gle/n6VL2xCSeP6vgtgL6) to mark the completion of the first milestone. Note: This is a mandatory task to be eligible for the prize at the end of the challenge as it allows us to evaluate the submissions in the challenge so far. + + +Once you have completed the above, you can proceed with the 8th challenge. + + +## Task: +Welcome to the eighth challenge! + +This is a two part challenge to cover the concepts of Git Rebase and Git Squash. + +Resources to refer to: +1. [Git Rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) +2. [Git Squash](https://www.freecodecamp.org/news/git-squash-explained/) +3. [Git Merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge) + +Step 1: Ensure you have covered all the previous challenges properly and have completed the tasks in the previous challenges. + +Step 2: Today's goal is to understand the concept of Git Rebase and Git Squash. Go through these resources to understand the concept of Git Rebase and Git Squash as this will be used in the subsequent tasks. + +Step 3: Create a new branch in your forked repository by the name of ``challenge8`` and switch to that branch. + +Step 4: Add a new file by the name of ``your-github-username-3.md`` and add any details you may want to add to this markdown file and push the change to your forked repository. + +That's it for the first part of the challenge. From 2e5ff02edb91dcae478f45334f14da830564b6c7 Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Sat, 9 Sep 2023 11:40:20 +0530 Subject: [PATCH 02/15] 9 --- Challenges/challenge9.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Challenges/challenge9.md diff --git a/Challenges/challenge9.md b/Challenges/challenge9.md new file mode 100644 index 000000000..b45c61f32 --- /dev/null +++ b/Challenges/challenge9.md @@ -0,0 +1,19 @@ +## Welcome to Challenge 9 + +This challenge is a two part challenge to cover the concepts of Git Rebase and Git Squash and continuation of the previous challenge which is challenge 8. + + + +Task: + +1. First, make sure you are on the ``challenge8`` branch as created in the previous challenge. + +2. Create another commit by making some change in the ``your-github-username-3.md`` file and push the change to your forked repository. + +3. Now, we will use the concept of Git Rebase to squash the last two commits into one commit. +For this. Review the commits you've made on the challenge8 branch using the git log --oneline command. You should see two commits on the challenge8 branch. Use the interactive rebase command to squash the commits. + +4. In the interactive rebase editor, change the word pick to squash (or s) for the commits you want to combine. Save and close the editor. Edit the combined commit message when prompted. Force push the changes to your forked repository. + +5. Take the screenshot of the terminal when you have successfully used the git rebase to squash the commits and post it in the comment created in the first challenge (challenge 1). + From f58130965097ffedacdfaefc767330d0ad238b9f Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Sun, 10 Sep 2023 15:15:20 +0530 Subject: [PATCH 03/15] add 10th challenge --- Challenges/challenge10.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Challenges/challenge10.md diff --git a/Challenges/challenge10.md b/Challenges/challenge10.md new file mode 100644 index 000000000..1d57c74b4 --- /dev/null +++ b/Challenges/challenge10.md @@ -0,0 +1,24 @@ +## Welcome to Challenge 10 + +Welcome to the 10th challenge! + +Today's let's try to use the concept for Git Rebase you learnt but on a Pull Request. + + +Task: +1. Checkout to the branch you created in Challenge 2 in your forked repository. + +2. Create another commit by making some change in the markdown file (``your_github_username-details.md``) you created in Challenge 3 and push the change to your forked repository. + +3. Now, we will use the concept of Git Rebase to squash the last two commits into one commit. + +4. For this. Review the commits you've made on the branch using the git log --oneline command. You should see a number of commits on the branch. Use the interactive rebase command to squash the commits. + +5. In the interactive rebase editor, change the word pick to squash (or s) for the commits you want to combine. Save and close the editor. Edit the combined commit message when prompted. Force push the changes to your forked repository. + +6. Check if the commit reflects in the Pull request you created in Challenge 5 in the main challenge repository. + +( If it does not, then sync your forked repository with the main repository and push the changes to your forked repository.) + +7. Take the screenshot of the terminal when you have successfully used the git rebase to squash the commits and post it in the comment created in the first challenge (challenge 1). + From 3c6c508e1a4fdc95c8049cc8e7e4ac38457b9d49 Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Sun, 10 Sep 2023 16:32:08 +0530 Subject: [PATCH 04/15] Update challenge10.md --- Challenges/challenge10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Challenges/challenge10.md b/Challenges/challenge10.md index 1d57c74b4..e541f6529 100644 --- a/Challenges/challenge10.md +++ b/Challenges/challenge10.md @@ -6,7 +6,7 @@ Today's let's try to use the concept for Git Rebase you learnt but on a Pull Req Task: -1. Checkout to the branch you created in Challenge 2 in your forked repository. +1. Checkout to the branch you created in Challenge 3 in your forked repository. 2. Create another commit by making some change in the markdown file (``your_github_username-details.md``) you created in Challenge 3 and push the change to your forked repository. From 0d09f0a36d31cdbde7b946021cff5105a0bcecca Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Sun, 10 Sep 2023 16:33:06 +0530 Subject: [PATCH 05/15] Update challenge10.md --- Challenges/challenge10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Challenges/challenge10.md b/Challenges/challenge10.md index e541f6529..806fdacfd 100644 --- a/Challenges/challenge10.md +++ b/Challenges/challenge10.md @@ -8,7 +8,7 @@ Today's let's try to use the concept for Git Rebase you learnt but on a Pull Req Task: 1. Checkout to the branch you created in Challenge 3 in your forked repository. -2. Create another commit by making some change in the markdown file (``your_github_username-details.md``) you created in Challenge 3 and push the change to your forked repository. +2. Create another commit by making some change in the markdown file (``your_github_username-details.md``) you created in Challenge 5 and push the change to your forked repository. 3. Now, we will use the concept of Git Rebase to squash the last two commits into one commit. From 5cd6100419c968c85be16bcb793bdc244fac1074 Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Sun, 10 Sep 2023 16:55:47 +0530 Subject: [PATCH 06/15] update #2 --- Challenges/challenge10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Challenges/challenge10.md b/Challenges/challenge10.md index 806fdacfd..6840ff7aa 100644 --- a/Challenges/challenge10.md +++ b/Challenges/challenge10.md @@ -8,7 +8,7 @@ Today's let's try to use the concept for Git Rebase you learnt but on a Pull Req Task: 1. Checkout to the branch you created in Challenge 3 in your forked repository. -2. Create another commit by making some change in the markdown file (``your_github_username-details.md``) you created in Challenge 5 and push the change to your forked repository. +2. Create another commit by making some change in the markdown file (`.md`) you created in Challenge 5 and push the change to your forked repository. 3. Now, we will use the concept of Git Rebase to squash the last two commits into one commit. From b0f97aed7f3084a17cd9df04fdb6784953d9bebd Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Mon, 11 Sep 2023 11:15:18 +0530 Subject: [PATCH 07/15] 11 --- Challenges/challenge11.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Challenges/challenge11.md diff --git a/Challenges/challenge11.md b/Challenges/challenge11.md new file mode 100644 index 000000000..724b4a01c --- /dev/null +++ b/Challenges/challenge11.md @@ -0,0 +1,11 @@ +## Welcome to Challenge 11 + +Welcome to the 11th Challenge + +Today's challenge involves how to use ``git stash`` command effectively. You can refer on how to stash your commits [here](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning) + +Task: +1. Inside the branch you created in the previous challenge (challenge 3) ``your_github_username-details`` create a new file inside the directory ``contributors//`` directory. +2. Use the git stash command to move these changes to the stash area +3. Delete the content from the stash area and share a screenshot of this inside the Github issue you created in the first challenge. + From e76fb01ea51c9c62e84a9e27d2e98e5656a5c0a2 Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Tue, 12 Sep 2023 01:22:58 +0530 Subject: [PATCH 08/15] add challenge 12 Signed-off-by: shivaylamba --- Challenges/challenge12.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Challenges/challenge12.md diff --git a/Challenges/challenge12.md b/Challenges/challenge12.md new file mode 100644 index 000000000..381f1804a --- /dev/null +++ b/Challenges/challenge12.md @@ -0,0 +1,22 @@ +## Welcome to Challenge 12 + +Welcome to the 12th challenge! + +Today's challenge is based on the concept of signing your commits. Signing the commits is a way of showing that only authentic commits are being made. + +A lot of open source projects have DCO which stands for [Developer Certification of Origin](https://github.com/apps/dco) including this repository itself and it tries to verify that each commit is signed or not. In case your commit is not signed it will reflect in the pull request that it doesn't pass the DCO test. + +You can read more about how to sign commits [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) + +Task: +1. Setup the ability to sign commits locally in your systems +2. Whenever committing in the future always try to use signed commits +3. Make a new signed commit to the pull request that you have made in previous challenges by making this change to the ``.md`` file: +``` +--- +name: your_name +github_user_name: YOUR-GITHUB-USERNAME +url_of_github_issue: Link_of_the_github_issue_created_in_first_challenge +your_favroite_programming_language: Add your favorite programming language here +--- +``` \ No newline at end of file From 732355f05fbe209c934c821b9ac2c0316986be8c Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Wed, 13 Sep 2023 11:03:53 +0530 Subject: [PATCH 09/15] challenge 13 --- Challenges/challenge13.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Challenges/challenge13.md diff --git a/Challenges/challenge13.md b/Challenges/challenge13.md new file mode 100644 index 000000000..318f24414 --- /dev/null +++ b/Challenges/challenge13.md @@ -0,0 +1,26 @@ +## Welcome to Challenge 13th + +Welcome to the 13th Challenge + +Today we will be learning to work with GitHub Gists. + +Github Gists are a great way to share ideas and code snippets with others. + +#### Brief Overview + +GitHub Gist is two fold and you can either use it for sharing ideas or sharing smaple code. It supports **Markdown** +To learn more, vist: +- [Learn more about GitHub gist](https://help.github.com/en/enterprise/2.13/user/articles/about-gists) + +## Task + +- Create a gist writing on any software development related topic that interests you +- Create a gist sharing a small code snippet in your preferred programming language + +## How to Submit + +- Create your submission a markdown file named ``gist-solutions.md`` and add it inside the branch ``your_github_username-details`` used in previous challenges +- In your submission file add the links to your **2 gists** +- Ensure you push it so that it reflects inside your Pull request created in previous challenges + +Do remember to update your forum post on Discord with today's task completion and screenshot \ No newline at end of file From d6ed39ccc6657af936c459f9fcaec39e3dec1e90 Mon Sep 17 00:00:00 2001 From: shivaylamba Date: Thu, 14 Sep 2023 11:19:30 +0530 Subject: [PATCH 10/15] add challenge 14 --- Challenges/challenge14.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Challenges/challenge14.md diff --git a/Challenges/challenge14.md b/Challenges/challenge14.md new file mode 100644 index 000000000..7802e4986 --- /dev/null +++ b/Challenges/challenge14.md @@ -0,0 +1,14 @@ +## Welcome to Challenge 12 + +Welcome to the 12th Challenge + +Today's challenge is a re-practice of the 8th and 9th Challenge. + +So focus for this challenge will be to practice the ``git rebase`` command. + +Ensure to practice the ``git rebase`` command by creating your own local git repository. You can checkout this guide: https://www.freecodecamp.org/news/git-squash-explained/ + +Task: +1. Practice git rebase, and how to squash commit using git rebase in your local projects. For this you can make some changes in the branch and the file created in Challenge 3 & 5. +2. Once done, try to squash the commits in your pull request in the Challenge repository. +3. Also do sign your commits, covered in the Challenge 12. \ No newline at end of file From ccea6090c36332172d4bcdf27a3ce5bb09bca680 Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Thu, 14 Sep 2023 11:20:25 +0530 Subject: [PATCH 11/15] Update challenge14.md --- Challenges/challenge14.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Challenges/challenge14.md b/Challenges/challenge14.md index 7802e4986..09af080d9 100644 --- a/Challenges/challenge14.md +++ b/Challenges/challenge14.md @@ -1,6 +1,6 @@ -## Welcome to Challenge 12 +## Welcome to Challenge 14 -Welcome to the 12th Challenge +Welcome to the 14th Challenge Today's challenge is a re-practice of the 8th and 9th Challenge. @@ -11,4 +11,4 @@ Ensure to practice the ``git rebase`` command by creating your own local git rep Task: 1. Practice git rebase, and how to squash commit using git rebase in your local projects. For this you can make some changes in the branch and the file created in Challenge 3 & 5. 2. Once done, try to squash the commits in your pull request in the Challenge repository. -3. Also do sign your commits, covered in the Challenge 12. \ No newline at end of file +3. Also do sign your commits, covered in the Challenge 12. From a92094ff970fd8537e200b3dd4a8a09eecc989b2 Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Fri, 15 Sep 2023 09:46:49 +0530 Subject: [PATCH 12/15] Create challenge15.md --- Challenges/challenge15.md | 151 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 Challenges/challenge15.md diff --git a/Challenges/challenge15.md b/Challenges/challenge15.md new file mode 100644 index 000000000..61c165e48 --- /dev/null +++ b/Challenges/challenge15.md @@ -0,0 +1,151 @@ +## Welcome to Challenge 15 + +Congratulations on successfully completing the 14th challenge! This marks the completion of the second milestone of the challenge. + +Before you proceed with the 15th challenge, ensure you are required to have completed the following tasks to successfully mark the completion of the 1st milestone: + +## Preqrequisites to mark completion of 1st Checkpoint (Milestone): + +1. Use the creative shared for the successful completion of the first milestone: [Second Milestone Creative](https://github-production-user-asset-6210df.s3.amazonaws.com/129844674/268165917-34df9c63-be61-4ffc-af43-264703f89f0a.jpg) to share on any social platform: LinkedIn, Twitter, Facebook, Instagram, etc. marking the completion of the first milestone. + +2. Fill the Google form the following Google form: [Google Form](https://forms.gle/JnzBURSEjRejEgw4A) to mark the completion of the first milestone. Note: This is a mandatory task to be eligible for the prize at the end of the challenge as it allows us to evaluate the submissions in the challenge so far. + + +Once you have completed the above, you can proceed with the 15th challenge. + + +## Task: +Welcome to the 15th challenge! + +Read this [article on merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) as it is very important. + +Today is the first part of a two-part challenge related to resolving merge conflicts. To get started, follow these steps: + +Task: +Create a Scenario for Merge Conflict: + +- Create a new project on your local system (e.g., a code project or a text file). + +- Intentionally make changes to the same lines of code or content in different branches of your project to create a scenario where a merge conflict would occur during a merge or pull request. +Resolve the Merge Conflict: + +- Follow the steps outlined in this [article](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) to understand how to resolve merge conflicts. + +- Use the techniques mentioned in the article to resolve the conflict you intentionally created in your project. + +- Share Screenshot: Take a screenshot of your terminal or Git client when you are resolving the merge conflict. + +- Share this screenshot in the issue you created during the first challenge (Challenge 1) to demonstrate that you have successfully resolved a merge conflict. + +- By completing this challenge, you'll gain valuable experience in dealing with merge conflicts, a common occurrence in collaborative Git projects. + + +### Sample Example for merge conflict +Here is an example of a merge conflict: + + +Step 1: Set Up Your Repository +a. Create a new directory on your computer for your Git project: + +``` +mkdir merge-conflict-example +cd merge-conflict-example +``` + +b. Initialize the directory as a Git repository: + +``` +git init +``` + +Step 2: Create Two Branches +a. Create a new branch called feature-branch: + + ``` + git checkout -b feature-branch + + ``` +b. Create a file and make some changes in it. For example, create a file named example.txt and add the following content: + +``` +This is some content on the feature branch. +``` + +c. Stage and commit your changes: + +``` +git add example.txt +git commit -m "Add feature branch content" + +``` +d. Switch back to the main (or master) branch: + +``` +git checkout main +``` +e. Make changes to the same file, example.txt, in the main branch. For example: + +``` +This is some content on the main branch. +``` + +f. Stage and commit your changes on the main branch: +``` +git add example.txt +git commit -m "Add main branch content" +``` + +Step 3: Create a Merge Conflict +a. Attempt to merge the feature-branch into main: + +``` +git merge feature-branch +``` + +At this point, you'll encounter a merge conflict because both branches have made changes to the same part of the example.txt file. + + +Step 4: Resolve the Merge Conflict +a. Open the example.txt file in your code editor. + +b. You'll see Git's conflict markers, which look like this: + +``` +<<<<<<< HEAD +This is some content on the main branch. +======= +This is some content on the feature branch. +>>>>>>> feature-branch +``` + +c. Manually edit the file to decide which changes to keep. Remove the conflict markers and choose the content you want to keep. For example: + +``` +This is some content on the main branch. + +This is some additional content on the feature branch. +``` + +d. Save the file. + + +Step 5: Commit the Resolved Merge Conflict +a. Stage the resolved file: + +``` +git add example.txt +``` + +b. Commit the changes: + +``` +git commit -m "Resolve merge conflict" +``` + +Now, you've successfully created a scenario for a merge conflict, resolved it, and committed the changes. You can use these steps as a practical exercise to understand how merge conflicts work in Git. + + + + + + From e6ce3d6226e4908b8087ad35fc6ae93e75987be1 Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Fri, 15 Sep 2023 09:47:37 +0530 Subject: [PATCH 13/15] Update challenge15.md --- Challenges/challenge15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Challenges/challenge15.md b/Challenges/challenge15.md index 61c165e48..ffb8360c6 100644 --- a/Challenges/challenge15.md +++ b/Challenges/challenge15.md @@ -37,7 +37,7 @@ Resolve the Merge Conflict: - Share this screenshot in the issue you created during the first challenge (Challenge 1) to demonstrate that you have successfully resolved a merge conflict. -- By completing this challenge, you'll gain valuable experience in dealing with merge conflicts, a common occurrence in collaborative Git projects. + ### Sample Example for merge conflict From a2f3add6f0049c33161d9a56461f85b0a606f35c Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Fri, 15 Sep 2023 09:49:15 +0530 Subject: [PATCH 14/15] Update challenge15.md --- Challenges/challenge15.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Challenges/challenge15.md b/Challenges/challenge15.md index ffb8360c6..5085e1976 100644 --- a/Challenges/challenge15.md +++ b/Challenges/challenge15.md @@ -4,11 +4,11 @@ Congratulations on successfully completing the 14th challenge! This marks the co Before you proceed with the 15th challenge, ensure you are required to have completed the following tasks to successfully mark the completion of the 1st milestone: -## Preqrequisites to mark completion of 1st Checkpoint (Milestone): +## Preqrequisites to mark completion of 2nd Checkpoint (Milestone): -1. Use the creative shared for the successful completion of the first milestone: [Second Milestone Creative](https://github-production-user-asset-6210df.s3.amazonaws.com/129844674/268165917-34df9c63-be61-4ffc-af43-264703f89f0a.jpg) to share on any social platform: LinkedIn, Twitter, Facebook, Instagram, etc. marking the completion of the first milestone. +1. Use the creative shared for the successful completion of the second milestone: [Second Milestone Creative](https://github-production-user-asset-6210df.s3.amazonaws.com/129844674/268165917-34df9c63-be61-4ffc-af43-264703f89f0a.jpg) to share on any social platform: LinkedIn, Twitter, Facebook, Instagram, etc. marking the completion of the second milestone. -2. Fill the Google form the following Google form: [Google Form](https://forms.gle/JnzBURSEjRejEgw4A) to mark the completion of the first milestone. Note: This is a mandatory task to be eligible for the prize at the end of the challenge as it allows us to evaluate the submissions in the challenge so far. +2. Fill the Google form the following Google form: [Google Form](https://forms.gle/JnzBURSEjRejEgw4A) to mark the completion of the second milestone. Note: This is a mandatory task to be eligible for the prize at the end of the challenge as it allows us to evaluate the submissions in the challenge so far. Once you have completed the above, you can proceed with the 15th challenge. From 62740c3e3306f3902152aa4c28221ca8d8c9b5cd Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Fri, 15 Sep 2023 09:49:28 +0530 Subject: [PATCH 15/15] Update challenge15.md --- Challenges/challenge15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Challenges/challenge15.md b/Challenges/challenge15.md index 5085e1976..650b5cbb0 100644 --- a/Challenges/challenge15.md +++ b/Challenges/challenge15.md @@ -2,7 +2,7 @@ Congratulations on successfully completing the 14th challenge! This marks the completion of the second milestone of the challenge. -Before you proceed with the 15th challenge, ensure you are required to have completed the following tasks to successfully mark the completion of the 1st milestone: +Before you proceed with the 15th challenge, ensure you are required to have completed the following tasks to successfully mark the completion of the 2nd milestone: ## Preqrequisites to mark completion of 2nd Checkpoint (Milestone):