Skip to main content

Command Palette

Search for a command to run...

🚀 Day 10:Advance Git & GitHub for DevOps Engineers.

Updated
•2 min read
🚀 Day 10:Advance Git & GitHub for DevOps Engineers.
T

As a DevOps Engineer, I'm passionate about building and maintaining robust, efficient, and scalable infrastructure to enable seamless software delivery. With a strong foundation in C/C++, Linux, and a toolkit that spans AWS, Jenkins, Docker, Nagios, Kubernetes, YAML, Ansible, Terraform, Bash Scripting, Git, and GitHub, I'm well-equipped to tackle the challenges of modern software development and deployment.

Git Branching:

Git branching is like having separate workspaces within your project. Instead of changing the main part of your project directly, you can create branches like creating copies to experiment on specific tasks. Each project starts with a default branch main or master.

Once you're done working on your branch and everything looks good, you can merge your changes back into the main part of the project. This merging process is called a "pull request

Git Revert and Reset

Two commonly used tools that git users will encounter are those of git reset and git revert. The benefit of both of these commands is that you can use them to remove or edit changes you’ve made in the code in previous commits.

What Is Git Rebase?

Git rebase is a command that lets users integrate changes from one branch to another, and the logs are modified once the action is complete. Git rebase was developed to overcome merging’s shortcomings, specifically regarding logs.

What Is Git Merge?

Merging is Git's way of putting a forked history back together again. The git merge command lets you take the independent lines of development created by git branch and integrate them into a single branch.

Task 1: version01.txt should reflect at local repo first followed by Remote repo for review:

Step 1: Create and Switch to the 'dev' Branch

Step 2: Add version01.txt and Commit:

Step 3: Push dev Branch to the Remote

Step 4: Now, the 'version01.txt' file and the 'dev' branch are on the remote repository:

Task2: Add new commit in dev branch in Devops /Git/ version01.txt & after Restore the file to a previous version where the content should be “This is the bug fix in development branch”:

Task3:Demonstrate the concept of branches with 2 or more branches with a screenshot.

branches are a powerful concept that allows developers to work on different aspects of a project simultaneously without interfering with each other's changes. Think of a branch as an independent line of development within a Git repository.

  • add some changes to branch1 and merge that branch in master

Merging Changes:

  • Once the work in a branch is complete, the changes can be merged back into the main branch.

More from this blog

Trushid's blog

90 posts

Proficient in DevOps, Cloud & SDLC including analysis, design. Scripting, testing, automation, version control, documentation and support