yeecai / front-end-trivia

My collection of knowledge about JS/React/Css...topic interested in Issues.
0 stars 0 forks source link

#git everyday a git command #60

Open yeecai opened 2 years ago

yeecai commented 2 years ago

https://stackoverflow.com/questions/12147360/git-branch-d-gives-warning

Today I was trying to delete a feat/A branch that hadn't been merged to main because the feature went into production, while was on the new branch feat/B, then I got the warning 'but not yet merged to HEAD.' StackOverflow guys say that means the target branch to be deleted hasn't been merged with the current local branch yet, so I switched to main, then the warning was gone.

yeecai commented 2 years ago

review of the git command

  1. git branch -d feat/A
  2. git push -d origin feat/A