This repository contains all tasks completed as part of the Hero Vired Git & GitHub Assignment, including branching workflows, feature development, Git LFS usage, stash operations, pull requests, code reviews, and releases.
git_assignment_HeroVired/
│
├── calculator.py # CalculatorPlus application (Q1)
├── geometry.py # Geometry Calculator (Q3)
├── bigdata.zip (LFS example) # Large file tracked using Git LFS (Q2)
├── .gitattributes # Git LFS tracking rules
└── README.md # Assignment documentation
- Created repository named git_assignment_HeroVired
- Set repository visibility to Private
- Cloned the repo locally
git clone https://github.com/santoshbaba1/git_assignment_HeroVired.git
cd git_assignment_HeroViredgit checkout -b devImplemented:
- Addition
- Subtraction
- Multiplication
- Division
- Square Root (new feature)
File created: calculator.py
git checkout main
git merge dev
git pushRelease created: v1.0
A classmate was added as a collaborator for reviewing the code.
git checkout -b feature/sqrtImproved and tested the square root feature.
Updated implementation:
def divide(self, a, b):
if b == 0:
raise ValueError("Cannot divide by zero.")
return a / bgit checkout feature/sqrt
git pull origin dev- PR created from
feature/sqrt→main - Reviewer suggestions implemented
- PR merged into
dev
git checkout main
git merge dev
git pushRelease created: v2.0
git lfs installgit checkout -b lfsgit lfs track "*.zip"git add bigdata.zip .gitattributes
git commit -m "Added large zip file with Git LFS"
git push -u origin lfsCloned repository to verify automatic LFS download.
- Circle area:
π * r² - Rectangle area:
l * w
git checkout -b geometry-calculatorgit checkout -b feature/circle-area
git stashgit checkout -b feature/rectangle-area
git stashgit checkout feature/circle-area
git stash pop
git add .
git commit -m "Completed circle area feature"
git pushgit checkout feature/rectangle-area
git stash pop
git add .
git commit -m "Completed rectangle area feature"
git pushPRs created for both features targeting dev.
- PRs reviewed and approved
- Both merged into
main
A complete code review was given to a classmate, covering:
- Error handling
- Code improvements
- Testing suggestions
- README improvements
All tasks for:
- Q1 (CalculatorPlus)
- Q2 (Git LFS)
- Q3 (Geometry Calculator + Stash)
Have been successfully implemented.