Branches
-
Bringing the changes from one branch to another
- Merging
- Rebase
- Cherry-pick (specific commits not complete branch)
- Refer Here for merge documentation
Lab Setup
- I have create a local repo to simulate the below graph
Merge Instructions
- Always check out to destination branch (branch which wants changes)
git checkout <destination-branch-name>
- Execute the command to merge from the source branch (branch from which changes are requrired)
git merge <source-branch>
Fast Forward Merge
-
Overview
-
Commands
Merge (Standard)
-
Overview
- use the same commands
Rebase
-
Overview
- Refer Here for docs.
-
Commands:
- checkout to destination or target branch
git checkout <destination-branch-name> - rebase from source branch
git rebase <source-branch>
- checkout to destination or target branch
Merge-conflicts
- Refer Here for docs
