Can I remove branches using the commands below?
Local branch:
git branch -d <branchName>
Remote branch:
git push origin --delete <branchName>
Can I remove branches using the commands below?
Local branch:
git branch -d <branchName>
Remote branch:
git push origin --delete <branchName>
Yes.
One thing you should be aware of is that -d is a "safe" delete: it'll only let you delete a branch that's merged in to your current HEAD. If you want to delete any branch, use -D:
git branch -D <branchName>