DEV Community

Discussion on: Delete Your Master

Collapse
 
shhac profile image
Paul Somers

what you do on local master?

I've probably run all of the following on/using master in the last 2 weeks (albeit some via aliases)

git pull --ff-only
git branch --merged
git branch -r --merged
git rebase master
git merge master
git checkout -b
git reset --hard HEAD
git checkout master -- ./foo
git diff master...HEAD -- ./foo

Yep most of these would be equal with origin/master, but that is more typing, and others might result in a longer message (merge commit)

Thread Thread
 
jessekphillips profile image
Jesse Phillips • Edited

Not checking my commands but what is wrong with

git fetch & git switch --detach origin/master
git branch --merged
git branch -r --merged
git rebase origin/master 
git merge origin/master
git switch -c 
git reset --hard HEAD
git checkout origin/master -- ./foo
git diff origin/master...HEAD -- ./foo
Enter fullscreen mode Exit fullscreen mode