New Branch
-----------
To create a new branch
$ git checkout -b BRANCH-NAME
This is same as
$ git branch BRANCH-NAME
$ git checkout BRANCH-NAME
New Tag
-------
Create a new tag. This will create one locally
$ git tag -a TAG-NAME -m "commit message"
Push the new created tag to remote
$ git push --follow-tags
To view git tag message
$ git tag --list
Merge Branches
--------------
Note: When merging, it's the local copies that get merged. So make sure you have the latest copies locally for both branches.
To merge your branch to master
Switched to branch 'master'
$ git checkout master
$ git pull
Assuming you have the latest in your branch.
$ git merge BRANCH-NAME
If there are any merge conflicts, then you have to resolve them first before you push the merge. So after resolving any conflicts, just push the merge
$ git commit origin master
$ git push origin master
No comments:
Post a Comment