?? Day 11 Task: Advance Git & GitHub for DevOps Engineers: Part-2 ??
?? Day 11 Task: Advance Git & GitHub for DevOps Engineers: Part-2 ??
Hello, fellow DevOps Engineers! In today's session, we're going to delve into some advanced Git and GitHub techniques that will enhance your workflow. Let's explore these concepts using simple English and a bit of code wizardry! ??????
Git stash is your secret weapon for temporarily saving your precious code changes without making a commitment (literally!). This nifty command is perfect when you want to switch to a different branch without committing your current changes.
?? Here's how you can use it:
1. Create a new branch and make some changes.
2. Use 'git stash' to stash those changes. This will save them in a secret stash, away from your working directory.
3. Switch to a different branch, make some changes, and commit them
4. To get your stashed changes back, use git stash pop.
Now, the changes you made in the first branch are applied on top of the new commits in the different branch.
Task-02: Feature Addition
Commit this with message “ Added feature2.1 in development branch”
领英推荐
This will reapply the commits from the "development" branch onto the "Production" branch. The commit messages will be reflected in the "Production" branch.
Cherry-pick: ?? Cherry-pick is like handpicking your favorite commits from one branch and applying them to another. It's perfect for selectively bringing changes from one branch into another.
Task-03:
In this task, you want to cherry-pick a specific commit from the "development" branch and make additional changes
Resolving Conflicts:??
Conflicts can occur when you merge or rebase branches that have diverged, and you need to manually resolve the conflicts before git can proceed with the merge/rebase. git status command shows the files that have conflicts, git diff command shows the difference between the conflicting versions and git add command is used to add the resolved files.
#DevOps #Git #GitHub #Day11of90DaysDevOpsChallenege #90DaysDevOpsChallenege #awscloud #DevOpsWithCloud #GitBash #CherryPicking #tws #trainwithshubham Shubham Londhe