When I was new in the company, when doing a task, I was doing
git checkout master
git pull
git checkout -b BRANCH
git push -u origin BRANCH
to create a new branch, then I would do the task and do the usual
git add .
git commit -m MESSAGE
git push
and create PR, now, imagine I did this 3 months ago, so going back to the branch and updating it will give me all sort of problems ( I need to update to origin/candidate, then merge ... )
Would it be much cleaner if I can just delete the BRANCH with
git branch -D BRANCH
(also delete the remote BRANCH)
I want to (from an old branch, update the branch, then merge, but can I do that without the merging problems?) Just do the whole process again? (from the above?) which will save me from the updating of the branch and merging? Is that going to be a more clean process? Or you would suggest (other) alternatives?