From which branch does gitlab "pip install"?

I am using gitlab repositories also to install private packages via “pip install”. As far as I understood pip is installing from the “default” branch. Am I right?

Is there a way to change this behavior? (apart from appending @branchname to the git+ssh path in the the installation command)

Thank you!
David

Hi @DavidGerva

This is really a question about pip rather than GitLab, but I think the documentation you are looking for is here

2 Likes

Thank you very much @snim2!
I didn’t know it was “decided” by pip.

I still cannot find the branch choose, but now I’ll search through pip docs and forums. Thank you again!

There’s an example just where I linked you, I think?

MyProject @ git+https://git.example.com/MyProject.git@master

In that example they explicitly decide to install from the branch “master”.
But without the branch specification, this is what I’m asking, I cannot find in which way pip (git?) decide the branch to install from.

Ah, right. I think so, the default “revision” that pip retrieves is HEAD (in this LOC)

That’s it. Thank you @snim2!

1 Like