Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git pull from specific branch with specified URL

I am working on a branch of git. I want to take pull on this branch specifying the URL alongwith it. I have tried

git pull origin <branch> <url>

but it says error "fatal: Invalid refspec "

Both commands when ran independently works fine.

1 ) git pull origin <branch> Takes pull from successfully.

2) git pull <url> Takes pull from specified URL but from master branch instead.

I want to take pull from specifying the URL alongwith it so that it doesn't read git's config file and takes pull from 'branch' and 'url'.

like image 999
Anu Chawla Avatar asked Jul 21 '26 16:07

Anu Chawla


1 Answers

You need to provide the command git pull web_url branch_name

like image 189
Niraj kumar Avatar answered Jul 23 '26 07:07

Niraj kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!