git branch // show all branch
git branch -v // branches with some more details
Create Branch
git branch myBranch ( create branch )
git checkout myBranch ( switch to myBranch )
// OR
git checkout -b myBranch ( create & switch to that branch )
Branch merging
Go to the branch in which you want to merge another branch
// in dev branch & want to merge dev branch to master
git checkout master
git merge dev ( if master have no change , than all is well, else their may be conflict)
Have conflict
git status ( show all files in red that have conflict )
git diff mydir/abc.txt ( show difference in command line )
// OR open file and resolve conflict manually