Reputation: 2190
I am very much new to Git. Can anyone help me understand the follwoing.
Upvotes: 8
Views: 9870
Reputation: 6309
I've found a very helpful git clone syntax for doing builds where you do not need the entire git history of revisions. Note that this seems to require Git version 1.9+:
git clone -b <remoteBranch> --single-branch --depth 1 ssh://[email protected]:serverport/PathToProject <FolderName>
Notes:
This clones and checks out "remoteBranch" without the other branches, at a depth of 1 (so only the most recent file snapshots) into the folder "FolderName"
Upvotes: 12
Reputation: 70663
.git
directory exists.See CharelsB’s comment for tips on how to get more detailed answers ;).
Upvotes: 4