Skip to contentSkip to conversation

Using git clone

DISCUSSION Dr. George E. Moore 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Is it appropriate to use "git clone" to update the master branch of an existing repository? The current master branch is for a much earlier release candidate.

#1 lore raw
Quoted 3 lines · Dr. George E. Moore

Is it appropriate to use "git clone" to update the master branch of an existing repository? The current master branch is for a much earlier release candidate.

You generally want to use git fetch or git pull in that case. git clone creates an entirely new copy of the original repository.

Signature · 3 lines
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
#2 lore raw

----- Original Message -----

Quoted 2 lines

You generally want to use git fetch or git pull in that case. git clone creates an entirely new copy of the original repository.

Just to complement the answer: "git clone" is more or less a shorthand for "git init" followed by "git fetch" (to get the remote objects) and "git checkout" (to get the actual files). The original poster probably doesn't want the "git init" part here indeed.

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/