I am working on a script to automate branching, when i run a script it creates a head and pushes creates a new remote, i tried it with my personal repository and never had issues, but when i try to run it on my organization repo, it doesnt throw any error but i dont see a remote branch.
origin = cloned_repo.remote()
created_branch = cloned_repo.create_head(branch_name)
print("created branch :", created_branch)
origin.push(branch_name)
Hello @Nadeem Syed ,
I'm not familiar with gitpython at all, so just guessing based on what you observed. Can you check that origin (cloned_repo.remote()) looks right? Maybe you have multiple upstreams, and origin is not where you're checking if the branch was created?
Another possibility is if you're checking via UI, Bitbucket won't show merged branches when you first open list of branches. Since there're no commits on that newly created branch, it is considered as merged. Can you check by switching to All branches from just Active branches in the dropdown above the table and see if that helps?
Cheers,
Daniil
i did and i was only able to get one origin and for all branches i did check that as well, would there be any access issue for this ? as even tho the user has full write and read access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think so, otherwise I'd expect it to fail on the last line (push). Can you enable verbose logging for gitpython and check the output of the remote server for the push?
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.