Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does `git fetch origin master:master` mean?

What does git fetch origin master:master mean?

I mean the master:master part: I know what git fetch origin means, but what about the master:master part?

like image 345
Mahdi Avatar asked Mar 25 '16 05:03

Mahdi


1 Answers

The arguments after the remote (origin) are refspecs.

Using master:master will overwrite your master branch; see this answer.

See this answer for even more about git fetch's behavior with and without refspec arguments.

like image 167
torek Avatar answered Oct 19 '22 01:10

torek