Day10/90DaysofDevOps challenge -Advance Git & GitHub for DevOps Engineers
GIT Branching:
Branching in Git allows us to work on different features, bug fixes, or experiments in isolation, without affecting other parts of the repository. Each repository has a default branch, usually called "master" or "main," and we can create multiple other branches to work on specific tasks.
Git branching enhances productivity by ensuring proper coordination among developers and helping organize a series of planned, structured releases. Having a branching is necessary to avoid conflicts when merging and to allow for the easier integration of changes into the master.
Git revert and reset
git reset and git revert are commands that you can use to remove or edit changes you’ve made in the code in previous commits. Understanding how both of them work will save you a significant amount of time, allow you to make cleaner code, and have more confidence in making commits when you do.
Git revert:
Git Rebase and Merge:
git rebase:
git merge:
Task1:
Add a text file called version01.txt inside the DevOps/Git/ with “This is the first feature of our application” written inside
领英推荐
git add version01.txt
git commit -m "Added new feature"
git push -u origin dev
Task 2:
Continuing from Task 1, let's move on to the next set of actions:
1st line>> This is the bug fix in the development branch
Commit this with the message "Added feature2 in the development branch."
2nd line>> This is gadbad code
Commit this with the message "Added feature3 in the development branch."
3rd line>> This feature will gadbad everything from now.
Commit with the message "Added feature4 in the development branch
Task 3
Demonstrate the concept of branches with 2 or more branches with a screenshot.
Add some changes to the dev branch and merge that branch into the master
If you find my blog valuable, I invite you to like and share. Your feedback is precious as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together!????
Thank you??!!