Ahmad 'Abe' Baehaki
Adding Remote Git
git remote add origin https://github.com/user/repo.gitto add remote with
originas the name and
https://github.com/user/repo.gitas the URL.
Deleting Local Branch
git branch –D branchnameto delete
git branch | findstr /v "master" | xargs git branch -Dto delete all local branches except
git branch | findstr /v "master develop branchname" | xargs git branch -Dto delete all local branches except
Deleting Stale Remote Branches
Stale branch are a branch that has been deleted from the remote repository but are still exists locally.
git remote prune originto delete all stale branch.
git branch -d -r origin/branchnameto delete specific stale branch.