Thanks Leam

 

Follow up.

Case 2: <repo_dir> already exists from a previous clone.

 

Question: is it more efficient to

1.  Do what Leam just said: “cd <repo_dir>; git pull”

or

2.  Rm –rf <repo_dir>
git clone <repo>



??

(gut feeling it’s #1 that is more efficient)

 

 

-----Original Message-----
From: Leam Hall [mailto:leamh...@gmail.com] 
Sent: Wednesday, February 10, 2016 3:35 PM
To: git-users@googlegroups.com
Subject: Re: [git-users] Building GIT: how to get the set of source code on a 
branch in order to build it?

 

Case 1:

      git clone <repo>

 

Case 2:

      cd <repo_dir>

      git pull

 

Welcome to git!

 

 

On 02/10/16 18:33, Suu wrote:

> my interest is in creating scripts to build software stored in GIT 

> repos. (I am a build engineer) Brand new to GIT, actually never used 

> it, but now i have to build it.

> 

> I just want to 'get' the latest revision of the source code on a 

> branch (or master depending on the case), change dir to it, and start 

> make/ant/mvn ..., If there are several choices, I am looking for the 

> most efficient one.

> 

> Case 1: I am on a machine with NO git repository at all (first time 

> building that product, or the copy of the repository has been purged).

> How do I get the source code over?  "git clone"?

> 

> Case 2: I've got a copy of the repository, from the last time (already 

> built at least once, and the directory has not been purged), How do I 

> update the source code to be the latest on that branch?

> 'git pull' ? 'git fetch' ?

> Is it better/more efficient to purge the old code and start from scratch?

> 

> Thanks in advance

> 

> If that helps, I'm mostly on Linux or Unix

> 

> --

> You received this message because you are subscribed to the Google 

> Groups "Git for human beings" group.

> To unsubscribe from this group and stop receiving emails from it, send 

> an email to HYPERLINK 
> "mailto:git-users+unsubscr...@googlegroups.com"git-users+unsubscr...@googlegroups.com

> <mailto:git-users+unsubscr...@googlegroups.com>.

> For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to a topic in the Google 
Groups "Git for human beings" group.

To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/git-users/OKAbS8iXvxs/unsubscribe.

To unsubscribe from this group and all its topics, send an email to HYPERLINK 
"mailto:git-users+unsubscr...@googlegroups.com"git-users+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to