This repository contains work for multiple assignments including:
- Basic CalculatorPlus App with new feature (Square Root)
- Git LFS (Large File Storage) handling for large files
- Geometry Calculator using Git stash and branch management
This repository is created as part of a Git assignment for Hero Vired.
git_assignment_HeroVired
- Created repository:
git_assignment_HeroVired - Created and switched to
devbranch. - Added basic Calculator code with Addition, Subtraction, Multiplication, and Division methods.
- Created a new branch:
feature/sqrt - Uncommented and completed the
square_rootfunction:
import math
def square_root(self, x):
return math.sqrt(x)- Tested the Square Root functionality successfully.
- Found a bug where division by zero was not handled.
- Switched to
devbranch. - Fixed the
dividefunction:
def divide(self, a, b):
if b == 0:
raise ValueError("Cannot divide by zero.")
return a / b- Merged the bug fix into
feature/sqrtbranch to keep it updated.
- Created a Pull Request from
feature/sqrttomain. - Requested code review from a classmate.
- Incorporated feedback from the reviewer.
- Merged
feature/sqrtintodev. - Performed testing in
dev. - Merged
devintomain.
- Version 1.0 after basic Calculator.
- Version 2.0 after adding Square Root and fixing Divide bug.
- Visual Studio Code: for writing code and testing.
- Git CLI: for branching, committing, merging, and pull requests.
- Created new branch:
lfs.
- Installed Git LFS:
git lfs install- Tracked large files:
git lfs track "*.zip".gitattributesfile was automatically created.
- Uploaded a file larger than 200MB.
- Committed and pushed the file:
git add .
git commit -m "Added large file using Git LFS"
git push origin lfs- Cloned the repository on another system.
- Confirmed large files downloaded successfully using Git LFS.
- Git CLI: for Git LFS installation, adding, pushing.
- GitHub: for LFS management and verification.
- Created a branch:
geometry-calculator.
- Created a new branch:
feature/circle-area. - Wrote partial code:
def calculate_circle_area(self, radius):
return math.pi * radius ** 2- Stashed incomplete work:
git stash- Created a new branch:
feature/rectangle-area. - Wrote partial code:
def calculate_rectangle_area(self, length, width):
return length * width- Again stashed the incomplete work:
git stash- Switched to
feature/circle-areabranch. - Retrieved stashed changes:
git stash pop-
Completed and pushed circle feature.
-
Switched to
feature/rectangle-areabranch. -
Retrieved stashed changes.
-
Completed and pushed rectangle feature.
- Created two pull requests:
feature/circle-area➞devfeature/rectangle-area➞dev
- Got both PRs reviewed and approved.
- After testing both features in
dev, merged intomain.
- Visual Studio Code: for coding and testing.
- Git CLI: for branching, stashing, committing, merging.
- GitHub: for pull requests and code management.
python calculatorplus.pypython geometrycalculator.py- Kevin Koreth
- Creating and managing feature branches
- Handling large files using Git LFS
- Managing multiple incomplete features using Git Stash
- Bug fixing and code review workflows
- Best practices for working in a team using Git and GitHub
- Version 1.0 - Basic Calculator
- Version 2.0 - Added Square Root and bug fix