Assignment20Git26 GitOps-1720255786439
Assignment20Git26 GitOps-1720255786439
Assignment 2
Assignment 2
Note: Attempt any two questions from the following [5 Marks each]
1. Explain the advantages and disadvantages of using HTTPs URLs versus SSH URLs for accessing
remote Git repositories. Provide scenarios in which each type of URL would be preferable.
2. Describe the step-by-step process of adding a Git submodule to an existing Git repository.
Include the necessary commands and explain the purpose of the `.gitmodules` file.
3. Explain the key differences between lightweight tags and annotated tags in Git. Provide
examples of scenarios where you would choose one type of tag over the other.
Note: Attempt any two questions from the following [10 Marks each]
1. Discuss the significance of remote-tracking branches in Git. How do they facilitate collaboration
and code management in a distributed development environment?
2. Imagine you encounter a "non-fast-forward updates were rejected" error while pushing changes
to a remote repository. Explain what this error means, the potential causes, and the steps you
would take to resolve it.
3. You are working on a collaborative project with a team of developers. Explain the importance of
adding an "upstream" remote to your local Git repository. Provide a practical example of how this
remote is used to keep your local branch up-to-date with changes from the original repository.
Note: Attempt any two questions from the following [20 Marks each]
1. In the context of GitOps, explain how the ability to cherry-pick commits can impact the
deployment and management of infrastructure and applications. Provide an example of a GitOps
workflow that leverages cherry-picking for infrastructure updates.
2. Explain the concept of Git submodules and discuss two scenarios in software development
where using Git submodules would be beneficial. Provide advantages and disadvantages for
each scenario.
3. Suppose you have a team of developers collaborating on a project that includes Git submodules.
One team member has made updates to a submodule, but other team members are not seeing
these changes. Explain why this might happen and provide a solution for ensuring that all team
members have the latest submodule code.
4. Discuss the importance of Git aliases in simplifying Git submodule operations. Provide an
example of a Git alias you would configure to enhance the submodule workflow and explain how
it benefits developers.