A
A
Alexander2017-05-24 14:24:27
linux
Alexander, 2017-05-24 14:24:27

How to git pull a specific branch?

I am executing a command

git pull  https://[email protected]/user/repository.git /home/myserver/public_html/mysite.com

But how do you know which branch from the Bitbucket repository it pulls up? I have two branches - development and master. I need development to pull into this directory. And in another directory, I will already pull master as a combat version.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
lexnekr, 2017-05-24
@lexnekr

git pull origin from:to

  1. from - the name of the branch we are pulling
  2. to - the name of the branch into which we upload

M
Maxim Moseychuk, 2017-05-24
@fshp

There is no concept of "pull into a directory" in git.
You must clone the repository, and it will already switch to the branch of interest to you.
Before starting work, you need to read the documentation, and not unconsciously drive in incorrect commands.

V
Victor, 2017-05-24
@v_decadence

I don't really understand what you need, but git pull URL branch_namein theory it should work.
This will push the changes to your current branch from the branch_name repository located at the URL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question