Technology Hits

We cover important, high-impact, informative, and engaging stories on all aspects of technology. Subscribe to our content marketing strategy newsletter: https://drmehmetyildiz.substack.com/ Writer inquiries: https://digitialmehmet.com/contact

Git Mini Project

--

DevOps Project Series

Photo by Pankaj Patel on Unsplash

Hi
I’m starting a DevOps project series, and every week, I will upload a plan for a project focusing on DevOps tools and methodologies.

If you want to learn DevOps, you can work on the projects and gain a lot of insights.

We are starting with Git.

Project: Git Workflow Simulation

Objective

To simulate a real-world Git workflow where you work on a collaborative project, managing branches, commits, merges, and resolving conflicts.

Project Overview

You will create a simple project (a basic script, a Markdown document, or a small app) and follow a structured Git workflow using different commands.

Requirements & Assessment Tasks

  1. Project Setup
  • Initialize a Git repository (git init).
  • Create a remote repository on GitHub/GitLab/Bitbucket.
  • Link the remote repo (git remote add origin <repo-url> or git clone url).
  • Create an initial README.md and push the first commit (git add, git commit, git push).

2. Branching Strategy

  • Create a dev branch (git branch dev).
  • Switch to the dev branch (git checkout dev or git switch dev).
  • Create two feature branches (feature-1, feature-2) off dev (git checkout -b feature-1).

3. Working with Commits

  • Make multiple commits in feature-1 and feature-2 (git commit -m "message").
  • Use git log and git reflog to track commit history.

4. Merging & Rebasing

  • Merge feature-1 into dev (git checkout dev, git merge feature-1).
  • Try rebasing feature-2 on top of dev (git rebase dev).
  • Resolve merge conflicts if any (git status, git diff, git mergetool).

5. Stashing & Reset

  • Create an uncommitted change and stash it (git stash).
  • Apply the stash (git stash apply or git stash pop).
  • Try resetting a commit (git reset --soft or git reset --hard).

6.Working with Remote Repositories

  • Push a feature branch (git push origin feature-1).
  • Fetch latest updates (git fetch).
  • Pull the latest changes (git pull).
  • Work with git cherry-pick to pick specific commits.

7. Rewriting History

  • Modify commit history using git commit --amend.
  • Squash multiple commits (git rebase -i HEAD~3).

8. Tagging & Releases

  • Create a version tag (git tag v1.0).
  • Push tags to remote (git push origin --tags).

9. Collaboration & PR Simulation

  • Fork a repository and clone it.
  • Simulate a Pull Request by pushing a branch and merging it via GitHub/GitLab UI.

Deliverabes

  • A GitHub repository with all branches.
  • A log of commands used and your thoughts on each.
  • A report on challenges faced (e.g., conflicts, mistakes) and how you resolved them.

You can update me on your progress, and I can help you troubleshoot issues or suggest improvements. How does this sound? 🚀

--

--

Technology Hits
Technology Hits

Published in Technology Hits

We cover important, high-impact, informative, and engaging stories on all aspects of technology. Subscribe to our content marketing strategy newsletter: https://drmehmetyildiz.substack.com/ Writer inquiries: https://digitialmehmet.com/contact

Shreya Sinha
Shreya Sinha

Written by Shreya Sinha

Programmer on weekdays, Creative writer on weekends. New content every Friday. Connect with me: https://linktr.ee/ShreyaSinha

No responses yet