Question 1 - cybermad7373/73772126145-DevOps-Assignment1 GitHub Wiki

Illustrate the following GIT operations using local and remote (Github) repositories with the screenshots of the demonstration.

git clone - The 'git clone' command is used to create a local copy of a Git repository, and it can be executed with the following syntax: 'git clone '

git clone

git push - The 'git push' command is used to upload local changes to a remote Git repository. This command pushes the changes from your local "main" branch to the "main" branch on the remote repository named "origin."

git push

git pull - The 'git pull' command is used to fetch and integrate changes from a remote repository into the current branch. This command fetches changes from the "main" branch on the remote repository named "origin" and integrates them into your current local branch.

git pull

git reset - The 'git reset' command is used to reset the current branch to a specific commit or undo changes in the working directory.

git reset

git commit - The 'git commit' command is used to save changes to the local repository.

git commit

git log - The 'git log' command is used to display the commit history of a repository.

git log

git status - The 'git status' command is used to display the current status of your working directory in relation to the Git repository.

git status

git stash - The 'git stash' command is used to temporarily save changes that are not ready to be committed, allowing you to switch branches or perform other tasks without committing the changes.

git stash

Pull Request - To create a pull request, make changes in a feature branch, push the branch to the remote repository, and use the hosting platform's interface (e.g., GitHub) to initiate the pull request for code review and merging.

pull request

Branching & Merging Commands - For branching and merging in Git, create, switch, and merge branches using commands such as _git branch_, _git checkout_ or _git switch_, _git merge_, and handle conflicts with _git add_ and _git commit_.

branching merging

Branch Protection Rules & Merge Conflicts - To enforce branch protection rules, configure settings on the hosting platform (e.g., GitHub) to prevent direct pushes and require pull requests, and when encountering merge conflicts, manually resolve conflicts, use _git add_ to stage changes, and then commit the resolved changes with _git commit_.

merge conflict branch protection