美文网首页
git delete

git delete

作者: Time_Notes | 来源:发表于2021-12-21 15:21 被阅读0次

    https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/

    // delete branch locally

    git branch -d localBranchName

    // delete branch remotely

    git push origin --delete remoteBranchName

    If you get the error below, it may mean that someone else has already deleted the branch.

    error: unable to push to unqualified destination: remoteBranchName The destination refspec neither matches an existing ref on the remote nor begins with refs/, and we are unable to guess a prefix based on thesourceref. error: failed to push some refs to'git@repository_name'


    try to synchronize your branch list using:

    git fetch -p

    The -p flag means "prune". After fetching, branches which no longer exist on the remote will be deleted.

    相关文章

      网友评论

          本文标题:git delete

          本文链接:https://www.haomeiwen.com/subject/xuexqrtx.html