Issue #157 resolved

removing git branch does not work?

Anonymous created an issue

I want to delete a 'public' branch in the repo. I tried: {{{ git branch -rd TOREMOVE git push origin :TOREMOVE }}} and {{{ git branch -rd origin/TOREMOVE }}} but it didn't work.

I also tried this an user that is administrator, still no luck.

Comments (4)

  1. Sebastian Sdorra repo owner

    I could not reproduce this issue. Here are my step to remove a branch:

    $ git clone http://localhost:8080/scm/git/issues/157
    Cloning into '157'...
    Username for 'http://localhost:8080': scmadmin
    Password for 'http://scmadmin@localhost:8080': 
    warning: You appear to have cloned an empty repository.
    $ cd 157 
    $ echo a > a.txt
    $ git add a.txt 
    $ git commit -m 'added a'
    [master (root-commit) 699938d] added a
     1 file changed, 1 insertion(+)
     create mode 100644 a.txt
    $ git branch toremove
    $ git checkout toremove
    Switched to branch 'toremove'
    $ echo b > b.txt
    $ git add b.txt 
    $ git commit -m 'added b to toremove'
    [toremove 0b7c376] added b to toremove
     1 file changed, 1 insertion(+)
     create mode 100644 b.txt
    $ git checkout master
    Switched to branch 'master'
    $ echo c > c.txt
    $ git add c.txt 
    $ git commit -m 'added c'
    [master 1266e78] added c
     1 file changed, 1 insertion(+)
     create mode 100644 c.txt
    $ git push origin master
    Username for 'http://localhost:8080': scmadmin
    Password for 'http://scmadmin@localhost:8080': 
    Counting objects: 6, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (6/6), 443 bytes, done.
    Total 6 (delta 0), reused 0 (delta 0)
    remote: Updating references: 100% (1/1)
    To http://localhost:8080/scm/git/issues/157
     * [new branch]      master -> master
    $ git push origin toremove
    Username for 'http://localhost:8080': scmadmin
    Password for 'http://scmadmin@localhost:8080': 
    Counting objects: 4, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 273 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    remote: Updating references: 100% (1/1)
    To http://localhost:8080/scm/git/issues/157
     * [new branch]      toremove -> toremove
    $ git branch -d toremove
    error: The branch 'toremove' is not fully merged.
    If you are sure you want to delete it, run 'git branch -D toremove'.
    $ git branch -D toremove
    Deleted branch toremove (was 0b7c376).
    $ git push origin :toremove
    Username for 'http://localhost:8080': scmadmin
    Password for 'http://scmadmin@localhost:8080': 
    remote: Updating references: 100% (1/1)
    To http://localhost:8080/scm/git/issues/157
     - [deleted]         toremove
    
  2. Log in to comment