With the help of the Git stash command, you can preserve changes
you've made to your working directory without really committing them. When you
need to work on something else but don't want to commit the changes you've made in your current branch quite yet, this is helpful. You must first build a new
branch and make some modifications to it before you can use Git stash. After
that, you can save those modifications using the git stash command. By doing
this, the modifications will be recorded in a new stash instead of remaining in
your working directory. These adjustments can be made afterwards. The list of
stored changes is displayed using the git stash list command.
Cherry-pick:
Using the Git cherry-pick command, you can pick out particular commits from one branch and apply them to another. When you wish to selectively apply changes made in one branch to another, this can be helpful.
You must first create two new branches and commit some changes to them before you can utilize git cherry-pick. The exact commits from one branch are then chosen and applied to the other branch using the git cherry-pick command with the specified commit hash.
Resolving Conflicts:
When merging or rebasing branches that have diverged, conflicts might arise, and you must manually address the conflicts before git can continue with the merge/rebase. The git status command displays the files that have conflicts, the git diff command compares the versions that are at odds, and the git add command is used to add the files that have been resolved.