Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 760 Bytes

branch.management.md

File metadata and controls

35 lines (30 loc) · 760 Bytes

branch.management.md

list of branches without less

git --no-pager branch

open empty branch on git

# new branch without any commit 
git checkout --orphan branchNameHere
# delete all files
git rm -rf .
# commit without any file
git commit --allow-empty -m "init commit of branchNameHere branch"
# go back to master 
git checkout master

delete branch

# delete branch locally
git branch -d localBranchName

# delete branch remotely
git push origin --delete remoteBranchName

delete last commit

git reset --hard HEAD~1