Git Contd..
Git Branch
- Branch allows us to have parallel development in the same repository
- Create a new local repo (git init) and make first commit
- Branch to a git is a pointer to a commit id which is latest commit on the branch
- Lets create a new branch REL_v1.0 (Release for v1.0)
- Lets move to REL_v1.0 branch
- Now lets add a commit to REL_v1.0 branch
- Now lets move to master and look at history
-
Now lets add a commit to master branch
-
Once we have these branches there will be needs to bring changes from one branch to another. To acheive this we need to work with
- merge
- Three way merge
- no fast forward merge
- Rebase
- cherry pick
- merge
- When we do any of the above, there might be cases leading to conflicts (merge conflicts)