๐Ÿš€ Master Advanced Git & GitHub in #DevOps! ๐Ÿš€

๐Ÿš€ Master Advanced Git & GitHub in #DevOps! ๐Ÿš€

ยท

2 min read

๐ŸŒŸ Calling all DevOps enthusiasts! ๐ŸŒŸ Level up your version control skills with Day 11 of the #90DaysOfDevOps Challenge - Part 2: Advanced Git & GitHub! ๐ŸŽ‰

Git Stash: Git stash is a command that allows you to temporarily save changes you have made in your working directory, without committing them. This is useful when you need to switch to a different branch to work on something else, but you don't want to commit the changes you've made in your current branch yet.

To use Git stash, you first create a new branch and make some changes to it. Then you can use the command git stash to save those changes. This will remove the changes from your working directory and record them in a new stash. You can apply these changes later. git stash list command shows the list of stashed changes.

Cherry-pick: Git cherry-pick is a command that allows you to select specific commits from one branch and apply them to another. This can be useful when you want to selectively apply changes that were made in one branch to another. To use git cherry-pick, you first create two new branches and make some commits to them. Then you use git cherry-pick <commit_hash> command to select the specific commits from one branch and apply them to the other.

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.

๐Ÿ”’ Safeguard your progress with Git Stash, ๐Ÿ’ cherry-pick the best commits, and gracefully resolve merge conflicts ๐Ÿ”„ to enhance collaboration! ๐Ÿค

๐Ÿ“‹ Hands-on tasks await you:

  1. Stash & Apply Changes ๐Ÿ“‹

  2. Rebase & Write Better Commit Messages ๐Ÿ“

  3. Cherry-pick & Optimize Features ๐Ÿ’

ย