Skip to content

Week 4 Challenge - DevOps Batch 9: Git & GitHub Advanced Challenge Solution#380

Closed
SuperSection wants to merge 4 commits intoTrainWithShubham:masterfrom
SuperSection:week4-git_github
Closed

Week 4 Challenge - DevOps Batch 9: Git & GitHub Advanced Challenge Solution#380
SuperSection wants to merge 4 commits intoTrainWithShubham:masterfrom
SuperSection:week4-git_github

Conversation

@SuperSection
Copy link

@SuperSection SuperSection commented Feb 15, 2025

About the PR

This PR adds the solution for the Week 4 Challenge of the 90DaysOfDevOps 2025 . The challenge focused on practicing essential Git and GitHub commands, including repository management, branching strategies, authentication, and SSH setup.

📂 Changes Included

  • solution.md → Step-by-step documentation of the challenge tasks with explanations and commands.
  • Added Images to illustrate each step (cloning, commits, branching, SSH setup, etc.).

Covered Topics:

  • Forking & Cloning Repositories
  • Initializing a Git Repository
  • Committing & Pushing Changes
  • Branching & Merging
  • Viewing Commit History
  • Setting Up SSH Authentication
  • 📸 Screenshots & Evidence
  • Included relevant images in solution.md for better understanding.
  • Provided commit history and branch merges as proof of completion.

🚀 How to Review?

  • Check solution.md for accuracy and completeness.
  • Verify that the Git commands and explanations are clear.
  • Ensure proper formatting and image references are correct.

✨ Gratitude and Open for Discussion

Any feedback or suggestions are welcome!
Looking forward to contributing more in the #90DaysOfDevOps journey.

Summary by CodeRabbit

  • Documentation
    • Introduced a comprehensive guide for completing the Week 4 Challenge of the #90DaysOfDevOps program, detailing essential Git operations and advanced tasks.
    • Added a new document on advanced Git and GitHub practices, covering pull requests, undoing changes, stashing, cherry-picking, rebasing, and common branching strategies.
    • Both guides include step-by-step instructions and visual aids to enhance user understanding.

@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2025

Walkthrough

This pull request introduces two comprehensive guide documents for the #90DaysOfDevOps program. The first document provides detailed, step-by-step instructions for the Week 4 Challenge, covering essential Git operations such as forking, cloning, initializing repositories, committing changes, configuring remotes with a Personal Access Token (PAT), branch creation, and SSH authentication. The second document focuses on advanced Git practices, including creating pull requests, undoing changes, stashing, cherry-picking, rebasing, and common branching strategies. Each task is structured with clear instructions and accompanying images.

Changes

File Path Summary
2025/git/.../solution.md Introduces a structured guide for the Week 4 Challenge, detailing essential Git operations including forking, cloning, repository initialization, committing changes, configuring remotes with PAT, branch creation, and SSH setup.
2025/git/.../solution.md Provides a comprehensive guide on advanced Git practices, covering creating pull requests, undoing changes, stashing, cherry-picking, rebasing, and common branching strategies.

Possibly related PRs

  • LondheShubham153/90DaysOfDevOps#373: Contains similar detailed instructions for the Week 4 Challenge, focusing on Git operations and workflow configurations.
  • LondheShubham153/90DaysOfDevOps#344: Details specific tasks related to setting up a Git repository and pushing changes, indicating a direct connection in the context of Git operations.
  • LondheShubham153/90DaysOfDevOps#384: Outlines a comprehensive challenge that includes creating pull requests and other advanced Git operations, indicating a direct connection in content and tasks related to Git workflows.

Suggested labels

no-pr-activity

Suggested reviewers

  • LondheShubham153

Poem

Hop, hop, hooray, my dear friend,
A Git guide arrives—its steps never end!
From clone to commit and SSH delight,
Branches and PRs soaring in flight.
I nibble on carrots while code gains its gleam,
Celebrating changes in a bunny dream!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
2025/git/01_Git_and_Github_Basics/solution.md (2)

142-147: Positive and Engaging Conclusion with a Note on Tone
The conclusion effectively conveys the sense of accomplishment while summarizing the challenge. One minor suggestion: if a more formal tone is desired, consider moderating punctuation (e.g., the exclamation mark).

🧰 Tools
🪛 LanguageTool

[style] ~144-~144: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2040 characters long)
Context: ...eek 4 Challenge** of #90DaysOfDevOps! This challenge deepened my understandin...

(EN_EXCESSIVE_EXCLAMATION)


16-16: Verify Image References and File Resources
All image placeholders (e.g., image.png, image-1.png, etc.) are used appropriately to support the instructions. Please double-check that these image paths are correct and that the images are optimized for display in the documentation.

Also applies to: 26-26, 48-48, 62-62, 96-96, 103-107, 129-129, 138-138, 146-146

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd7d107 and 3f142ef.

⛔ Files ignored due to path filters (13)
  • 2025/git/01_Git_and_Github_Basics/image-1.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-10.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-11.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-12.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-2.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-3.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-4.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-5.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-6.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-7.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-8.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image-9.png is excluded by !**/*.png
  • 2025/git/01_Git_and_Github_Basics/image.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • 2025/git/01_Git_and_Github_Basics/solution.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
2025/git/01_Git_and_Github_Basics/solution.md

[style] ~144-~144: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2040 characters long)
Context: ...eek 4 Challenge** of #90DaysOfDevOps! This challenge deepened my understandin...

(EN_EXCESSIVE_EXCLAMATION)

🔇 Additional comments (13)
2025/git/01_Git_and_Github_Basics/solution.md (13)

1-7: Clear and Informative Introduction
The title and introduction set the stage very well for the Week 4 Challenge, clearly outlining the focus areas and what the reader can expect.


9-17: Well-Structured Task 1: Forking the Repository
The instructions for forking are clear and enriched with a link to the original repository and an accompanying image placeholder. This will help users easily understand the process.


20-24: Accurate Cloning Instructions
The code block for cloning the forked repository is well-formed. It uses a placeholder for the fork URL and includes the necessary commands in a sequential manner, which makes it easy to follow.


32-38: Concise Git Repository Initialization
The steps to create a directory, change into it, and initialize a Git repository are straightforward. This section is clear and properly organized.


40-46: Clear File Creation and Commit Process
The commands to create a file (info.txt), add it to the staging area, and commit it with a descriptive message are correct. This reinforces good Git practices for beginners.


52-60: Accurate Remote Configuration with PAT
The section detailing how to set up the remote using a Personal Access Token is precise. The placeholder notations remind the user to replace values with their own, which is essential for secure setup.


66-72: Straightforward Git Log Command
The instructions for viewing the commit history using git log are simple and effective. This code block will help users verify their commit history with ease.


80-85: Effective Branch Creation and Switching
The commands for creating a new branch and switching to it (git branch feature-update and git switch feature-update) are well presented in their own code block. This clear segmentation makes the branching process easy to understand.


87-94: Clear Instructions for Modifying and Pushing on a Feature Branch
Appending details to the file, adding, committing, and pushing changes are all covered precisely. The command sequence is logical and easy to follow for users updating their feature branch.


98-108: Comprehensive Merging Process Overview
The guide explains how to create a pull request and merge changes effectively. The inclusion of optional steps (like branch deletion) adds useful context to various workflow preferences.


115-117: Correct SSH Key Generation Command
The SSH key generation command is accurately presented, using the preferred ed25519 algorithm for enhanced security, alongside a helpful comment for user context.


123-125: Clear Public Key Retrieval Instruction
The command to display the SSH public key (cat ~/.ssh/id_ed25519.pub) is succinct and valuable for users to copy the key to their GitHub settings.


133-136: Accurate Remote URL Update for SSH Authentication
Updating the remote URL to use SSH is well-documented here. The instructions prompt users to replace the placeholder with their actual GitHub username, ensuring the configuration works correctly.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
2025/git/02_Git_and_Github_Advanced/solution.md (4)

11-17: Fork and Clone Instructions are Clear
The step-by-step instructions accompanied by a bash code block provide a straightforward guide to forking and cloning a repository. Consider adding a note that placeholders (e.g., <your-forked-repo-url> and <repo-name>) should be replaced with actual values when the user executes these commands.


33-35: Expanding the PR Creation Step
The step "4. Open a PR on GitHub, Request Review, and Merge After Approval" is mentioned without additional details. Consider expanding this section with further guidance or references (e.g., adding screenshots or more explicit instructions) to ensure users fully understand the process.


54-104: Task 2: Undoing Changes – Reset & Revert
This section effectively demonstrates various reset modes (soft, mixed, and hard) along with the git revert command. The step-by-step examples and code blocks are clear. It might be helpful to include a brief caution regarding the risks of using git reset --hard to prevent unintended data loss.


106-135: Task 3: Stashing Instructions are Clear
The guide details how to stash changes, switch branches, and reapply the stash. The differentiation between git stash pop and git stash apply is useful. Note that minor punctuation tweaks could be applied to enhance clarity (as hinted by static analysis), but these are very minor.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~132-~132: Loose punctuation mark.
Context: ...d git stash apply** - git stash pop: Applies the stashed changes and removes...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~133-~133: Loose punctuation mark.
Context: ...from the stash list. - git stash apply: Applies the stashed changes but keeps t...

(UNLIKELY_OPENING_PUNCTUATION)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f142ef and 0a14859.

📒 Files selected for processing (1)
  • 2025/git/02_Git_and_Github_Advanced/solution.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
2025/git/02_Git_and_Github_Advanced/solution.md

[uncategorized] ~132-~132: Loose punctuation mark.
Context: ...d git stash apply** - git stash pop: Applies the stashed changes and removes...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~133-~133: Loose punctuation mark.
Context: ...from the stash list. - git stash apply: Applies the stashed changes but keeps t...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (11)
2025/git/02_Git_and_Github_Advanced/solution.md (11)

1-4: Introduction is Clear and Informative
The title and the opening paragraph set the stage well for the advanced Git challenge. The overall context of the document is clear.


7-10: Task 1 Header is Well Structured
The header "## Task 1: Working with Pull Requests (PRs)" clearly indicates the beginning of the first task. The use of markdown formatting is effective for readability.


18-26: Feature Branch Creation and Commit Process is Detailed
The document clearly describes how to create a feature branch, make changes, and commit them. The code block example is concise and easy to follow.


27-32: Push Command for Feature Branch is Concise
The instructions for pushing the feature branch to the remote repository are clear and appropriately formatted with the enclosed code block.


36-44: Best Practices for Writing PR Descriptions are Well Covered
The bullet-point list offers practical advice on writing clear titles, descriptions, and incorporating screenshots. This section is well-written and provides valuable best practices.


45-51: Handling Review Comments Section is Clear
The guidelines provided for managing review comments—including using additional commits and interactive rebasing—are concise and actionable.


137-169: Task 4: Cherry-Picking is Well Detailed
The instructions for cherry-picking include clear examples for finding a commit, applying it, and resolving conflicts. The additional notes on its benefits and risks provide a comprehensive understanding for the user.


171-209: Task 5: Rebasing Instructions are Comprehensive
The section explains fetching changes, rebasing, and continuing after conflict resolution effectively. The comparative table between merge and rebase further clarifies the differences. Best practices for interactive rebase add extra value for maintaining a clean commit history.


211-242: Task 6: Branching Strategies are Clearly Outlined
The document clearly distinguishes between Git Flow, GitHub Flow, and Trunk-Based Development. The included example of simulating a Git workflow via branch creation commands is a nice practical touch.


244-263: Final Submission Steps are Concise and Actionable
The final steps detail the submission process—from adding and committing changes to pushing them and creating a pull request. Including steps to share the experience on LinkedIn rounds out the process in a practical manner.


264-267: Conclusion Effectively Summarizes the Document
The concluding section succinctly restates the key learning outcomes, reinforcing the importance of mastering these Git concepts for effective CI/CD practices.

@github-actions
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant