The objective of this assignment was to get familiar with Git Flow for structured branching and to practice advanced Git operations such as Squash, Reset, Rebase, and Cherry-Pick.
git clone <repository-url>
cd <repository-name>
git init
git flow initgit flow feature start TP2-T1299_Project_Setupgit checkout -b TP2-T1299_Project_Setup_SubBranchSquash Commit:
Combine multiple commits into one for a cleaner history.
git rebase -i HEAD~<number_of_commits>Reset:
Undo changes either by keeping them staged (--soft) or discarding completely (--hard).
git reset --soft HEAD~1
git reset --hard HEAD~1Rebase:
Update your branch with the latest changes from develop.
git checkout TP2-T1299_Project_Setup_SubBranch
git rebase developCherry-Pick a Commit:
Apply a specific commit from another branch.
git cherry-pick <commit-hash>git checkout develop
git push -u origin develop
git checkout TP2-T1299_Project_Setup
git push -u origin TP2-T1299_Project_Setup
git checkout TP2-T1299_Project_Setup_SubBranch
git push -u origin TP2-T1299_Project_Setup_SubBranch1 : Create a PR from TP2-T1299_Project_Setup_SubBranch to TP2-T1299_Project_Setup.
2 : Merge the PR after review.
3 : Create a PR from TP2-T1299_Project_Setup to develop.
4 : Merge the PR after review.