Branch
Thursday, January 18, 2018
5:43 AM
#This command will show which branch we currently have in our directory
git branch
cat .git/HEAD
#
git diff master..new_feature
#--merged
git branch --merged
#will return us all the branches that include the same commits
#delete branch, -d
git branch -d branch_to_delete
#Show remotes (as a type of branch)
git branch -r
#Show both remotes and branches (since they're basically the same, aka text file with a SHA ref)
git branch -a
#Let's create a new branch in our working directory which will start by cloning/tracking remote origin/non_tracking
git branch non_tracking origin/non_tracking
#How to delete a branch on the remote? (non_tracking:non_tracking)
git push origin :master
#or
#git push origin --delete non_tracking
br