This project demonstrates fundamental Git operations including repository cloning, file tracking, committing changes, branching, and merging. It provides a clear understanding of how version control systems manage code evolution and collaboration.
The objective of this practical is to understand and implement core Git workflows such as creating commits, managing branches, tracking changes, and merging feature work into the main branch.
The repository was cloned from GitHub to the local system to begin the workflow.
git clone https://github.com/Nitanshu715/DevOps-Containerization.git
Branches were inspected using Git commands to understand the repository structure.
git branch -a
A new file was created and committed to the repository.
echo test2 > test2.txt git add . git commit -m “test2”
The commit history was analyzed using:
git log –oneline git log –oneline –graph
This helped visualize the sequence of commits and branch structure.
A new feature branch was created to simulate development workflow.
git checkout -b featureA
A new file was added in the feature branch and committed.
echo feature work > feature.txt git add . git commit -m “feature added”
The commit graph was analyzed again to observe divergence between main and feature branch.
The feature branch was merged back into the main branch.
git checkout main git merge featureA
This practical demonstrates essential Git workflows used in real-world development environments. It highlights the importance of version control, structured branching, and proper commit management in software development.
The repository successfully incorporated changes from a feature branch into the main branch, demonstrating a complete Git workflow cycle.