Git Contd
Git Reference Objects
- We have 3 reference objects
- branches
- tags
- HEAD
- remote
- Reference objects are pointers which points to other reference or commit id.
Branches in Git
- Refer Here for branches
- Branches are created for having independent line of development
- lets list out the branches
- Lets create a branch
- branch:
marutisuzuki
- branch:
- Lets start working in marutisuzuki branch
git checkout marutisuzuki
* Now lets add one change
* Now lets checkout to master branch
* Lets make a new commit in master branch
- Merge is an operation to bring all the changes from one branch to another
- Lets merge changes from marutisuzuki to master
- Target branch: master
- source branch: maruti suzuki
-
Steps:
- Checkout to target branch
git checkout master
- merge the changes from source branch
git merge marutisuzuki
- Checkout to target branch
- Lets understand how git works. Please follow classroom recording for understanding how git works