Answer the question
In order to leave comments, you need to log in
How to connect to one of the branches of a remote repository?
There is a repository in which I need to complete a task. It's not mine, it was created by another programmer who gave me access to it in order to finalize one code there.
The bottom line is that the code I have to work on is on one of the branches of the repository. Those. there is a main branch and a mainpage branch. I need the mainpage branch.
When using the git clone <link> command, I download files from the main branch.
I'm just starting to learn git, so in order not to do business with someone else's code, I ask you to write a step-by-step instruction in the answer on how I can connect to the mainpage branch and get files from there in order to work in it in the future.
I ask you not to give answers with links to the git documentation, because I already tried to find an answer on it, but I haven’t fully figured it out yet, but I need to do it faster, which is why I’m contacting through Habr.
Answer the question
In order to leave comments, you need to log in
Okay folks, I've found the answer by trial and error.
I do not know how true he is, but he completed the task.
The command helped: git pull origin mainpage , where mainpage is the branch from which I needed files.
P.s. thanks to those who really tried to help me with their answers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question