Studyon Minte9.com
Git




Create / Delete






$ git checkout -b dev $ git branch dev * master $ git branch -d dev
Example:
$ git init (master) $ touch index.htm $ git add . $ git commit -m "Added from master" (dev) $ git checkout -b dev $ touch _DEV $ git add _DEV $ git commit -m _DEV (master) $ git checkout master (hotfix) $ git checkout -b hotfix $ touch _HOTFIX $ touch bugfix.htm $ git add bugfix.htm $ git add . $ git commit -m "Added from hotfix" (master) $ git checkout master $ git merge hotfix $ git branch -d hotfix // Deleted branch hotfix $ git branch dev * master $ rm _HOTFIX $ git rm _HOTFIX (dev) $ git merge master // Continuing in DEV