Git development
 help / color / mirror / Atom feed
* a few scenarios before I create my first repo [Scanned]
@ 2008-12-26  0:17 Conor Rafferty
  2008-12-26  0:46 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Conor Rafferty @ 2008-12-26  0:17 UTC (permalink / raw)
  To: git

 Dear All,
 
Apols for the newbie-ness of this post - I couldn't find a seperate
list/forum for user support.
 
I have no SCM for my projects and its becoming a nightmare. Lots of
folders lying around, with various versions.
Need to manage all this and do the work to catalog and archive the work
done so far and set up a good config mgmt framewrok for future work.
Been searching for an SCM and git seems good.
 
Before I create a repo of live files, I just wanna check:
 
(1a) 
Do I need to install windows git on the same machine I want to store the
files on ?
Or can I install git on my workstation PC and create the repo on the
server ?
 
(1b)
if i create a repo on my office PC, can it easily be moved (including
all history) to another PC (e.g. LAN server) if we decide to implement
git across the team
(If not, or its inconvenient, I need to create the repo on the server)
 
(2)
 if i create a repo on my work PC, can it easily be migrated (including
all history) to a repo on github (etc.) ?
 
(3) 
if I create a repo and commit the first baseline, can I later create an
ancestor commit to that baseline, if I subsequently find an older
version of the project lying around on the file system
(or, same concept i guess, if i find a project version that sits between
say version v1.0 and v1.1 (where v1.0 is the parent tag of v1.1) can i
interleave the project files as say v1.01.
 
I've a feeling the answer's will be YES to 1 & 2 and NO to 3, but the
documentation is too low level for a newb like me.
 
many thanks
 
-- 

Conor Rafferty BSc (Hons.) 
REGIONAL MANAGER 
Altmore IT Recruitment 
Townsend Enterprise Park 
28 Townsend Street 
Belfast BT13 2ES 

T: +44 (0)28 9032 8400 
E: conor.rafferty@altmore.co.uk  
W: www.altmore.co.uk 

LinkedIn: http://www.linkedin.com/in/conorrafferty


------------------------------------------------------------------------
--------

This electronic message contains information from Altmore IT Recruitment
which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are
not the intended recipient be aware that any disclosure, copying
distribution or use of the contents of this information is prohibited.
If you have received this electronic message in error, please notify us
by telephone or email (to the numbers or address above) immediately.


 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: a few scenarios before I create my first repo [Scanned]
  2008-12-26  0:17 a few scenarios before I create my first repo [Scanned] Conor Rafferty
@ 2008-12-26  0:46 ` Junio C Hamano
  2008-12-26  1:07   ` Zorba
  2008-12-26  2:07   ` Sitaram Chamarty
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2008-12-26  0:46 UTC (permalink / raw)
  To: Conor Rafferty; +Cc: git

What's [scanned]?

"Conor Rafferty" <conor.rafferty@altmore.co.uk> writes:

> (1a) Do I need to install windows git on the same machine I want to
> store the files on ?  Or can I install git on my workstation PC and
> create the repo on the server ?

The model employed by git is not "client working with centralized server".
On whichever machine you want to be recording your changes (aka "running
'git commit'"), you would need to have git installed.

> (1b) if i create a repo on my office PC, can it easily be moved
> (including all history) to another PC (e.g. LAN server) if we decide to
> implement git across the team (If not, or its inconvenient, I need to
> create the repo on the server)

git is a distributed source code management system.  People often deploy
one (or more, in hierarchical fashion in an advanced set-up) bare server
repository for everybody to meet and synchronize.  Each developer has one
repository (or more) on his or her own on his or her machines.  Most
notably, if you work on your notebook and on your desktop (i.e. two
machines), you will have (at least) one repository on each of them [*1*].

> (2) if i create a repo on my work PC, can it easily be migrated
> (including all history) to a repo on github (etc.) ?

I do not know about github in particular (that's #github question) but in
principle, yes.  Easy exchange of development histories across
repositories is the whole point of distributedness.

> (3) if I create a repo and commit the first baseline, can I later create
> an ancestor commit to that baseline, if I subsequently find an older
> version of the project lying around on the file system (or, same concept
> i guess, if i find a project version that sits between say version v1.0
> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the
> project files as say v1.01.

You can graft the older ones behind the root commit and filter-branch the
result to cast the graft in stone.  You are strongly recommended to do
that in one repository first, and have reasonable level of confidence in
the result before you publish it to other repositories, as running
filter-branch to rewrite the history after people (or yourself) cloned the
history to multiple places would cause trouble to thoese .

For more details, see the user-manual.  Don't dive into manual pages for
individual commands, which are for people who already understood the basic
concepts in the user manual.


[Footnote]

*1* Maybe we should change our pricing structure to be based on the number
of repositories, not on the number of users.  Currently we charge $0 per
user, but we should change $0 per repository ;-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: a few scenarios before I create my first repo [Scanned]
  2008-12-26  0:46 ` Junio C Hamano
@ 2008-12-26  1:07   ` Zorba
  2008-12-26  6:00     ` Sitaram Chamarty
  2008-12-26  2:07   ` Sitaram Chamarty
  1 sibling, 1 reply; 5+ messages in thread
From: Zorba @ 2008-12-26  1:07 UTC (permalink / raw)
  To: git

Junio,

I am deeply priveleged that a guy like you would answer my simple Q's, 
especially in holiday time !
Especially as now I've discovered a seperate list for users at 
gman.comp.version-control.git.user - apologies for posting here...

> What's [scanned]?

sorry, its just something Sophos adds to our outgoing email to show its 
virus checked it

>> (1a) Do I need to install windows git on the same machine I want to
>> store the files on ?  Or can I install git on my workstation PC and
>> create the repo on the server ?
>
> The model employed by git is not "client working with centralized server".
> On whichever machine you want to be recording your changes (aka "running
> 'git commit'"), you would need to have git installed.

Ok, I'll install git on workstation, where I'll be running the bash / gui 
from
but I'll create the repo on the server (for backup purposes) - so won't need 
to install git there I'm assuming?

 >> (1b) if i create a repo on my office PC, can it easily be moved
>> (including all history) to another PC (e.g. LAN server) if we decide to
>> implement git across the team (If not, or its inconvenient, I need to
>> create the repo on the server)
>
> git is a distributed source code management system.  People often deploy
> one (or more, in hierarchical fashion in an advanced set-up) bare server
> repository for everybody to meet and synchronize.  Each developer has one
> repository (or more) on his or her own on his or her machines.  Most
> notably, if you work on your notebook and on your desktop (i.e. two
> machines), you will have (at least) one repository on each of them [*1*].
>
>> (2) if i create a repo on my work PC, can it easily be migrated
>> (including all history) to a repo on github (etc.) ?
>
> I do not know about github in particular (that's #github question) but in
> principle, yes.  Easy exchange of development histories across
> repositories is the whole point of distributedness.

super!
I'm sorry distributed SCM was new to me
last time I used SCM was 10yrs ago - Visual Sourcesafe, PVCS (grrr), 
clearcase (not bad)

>> (3) if I create a repo and commit the first baseline, can I later create
>> an ancestor commit to that baseline, if I subsequently find an older
>> version of the project lying around on the file system (or, same concept
>> i guess, if i find a project version that sits between say version v1.0
>> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the
>> project files as say v1.01.
>
> You can graft the older ones behind the root commit and filter-branch the
> result to cast the graft in stone.  You are strongly recommended to do
> that in one repository first, and have reasonable level of confidence in
> the result before you publish it to other repositories, as running
> filter-branch to rewrite the history after people (or yourself) cloned the
> history to multiple places would cause trouble to thoese .

that's great, it will allow us to capture the flow of work in our project so 
far, and amend if some other version turns up !
Your answers are enough for me to proceed and give git a go.

> For more details, see the user-manual.  Don't dive into manual pages for
> individual commands, which are for people who already understood the basic
> concepts in the user manual.

thanks, your overview here has really helped

> [Footnote]
> *1* Maybe we should change our pricing structure to be based on the number
> of repositories, not on the number of users.  Currently we charge $0 per
> user, but we should change $0 per repository ;-)

LOL !
you guys are great, thank you on behalf of people like me

Happy Christmas ! 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: a few scenarios before I create my first repo [Scanned]
  2008-12-26  0:46 ` Junio C Hamano
  2008-12-26  1:07   ` Zorba
@ 2008-12-26  2:07   ` Sitaram Chamarty
  1 sibling, 0 replies; 5+ messages in thread
From: Sitaram Chamarty @ 2008-12-26  2:07 UTC (permalink / raw)
  To: git

On 2008-12-26, Junio C Hamano <gitster@pobox.com> wrote:
> What's [scanned]?
>
> "Conor Rafferty" <conor.rafferty@altmore.co.uk> writes:

>> (3) if I create a repo and commit the first baseline, can I later create
>> an ancestor commit to that baseline, if I subsequently find an older
>> version of the project lying around on the file system (or, same concept
>> i guess, if i find a project version that sits between say version v1.0
>> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the
>> project files as say v1.01.
>
> You can graft the older ones behind the root commit and filter-branch the
> result to cast the graft in stone.  You are strongly recommended to do
> that in one repository first, and have reasonable level of confidence in
> the result before you publish it to other repositories, as running
> filter-branch to rewrite the history after people (or yourself) cloned the
> history to multiple places would cause trouble to thoese .

Considering the level of questions that Conor had, I thought
the following may be useful:

The way git works is that each commit is represented by a
sha-1 hash, which is an immutable 160-bit number that
"represents" that commit.  The hash of the parent commit(s),
if any, as well as the contents of the current "tree" are
inputs to this hash, so if you create or change a parent,
the hash will change.

The sanctity of these hashes is fundamental to the
distributedness of git, so when you do something like that,
you're causing problems to any other repos which "pull"ed
from you, or which you "push"ed to -- they thought your
"latest" commit had, say, hash "A", but now hash "A" no
longer exists in your repo and has been replaced by hash
"B".

I have not (yet) had occasion to use either grafting or
filter-branch, but I'm pretty sure someone would have a nice
tutorial somewhere they can point to...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: a few scenarios before I create my first repo [Scanned]
  2008-12-26  1:07   ` Zorba
@ 2008-12-26  6:00     ` Sitaram Chamarty
  0 siblings, 0 replies; 5+ messages in thread
From: Sitaram Chamarty @ 2008-12-26  6:00 UTC (permalink / raw)
  To: git

On 2008-12-26, Zorba <cr@altmore.co.uk> wrote:

> Ok, I'll install git on workstation, where I'll be running the bash / gui 
> from
> but I'll create the repo on the server (for backup purposes) - so won't need 
> to install git there I'm assuming?

I would certainly go for making that also a git repo instead
of just a file-based backup server.

This has has 2 benefits: (1) it allows people to work
together in a more controlled fashion than ad hoc push/pull
from each other (2) being a full-blown git repo, it can
store a lot more history, *and* it's faster and uses less
space/network bw doing so.

Such servers usually have a "bare repository", meaning
what's inside the ".git" subdirectory is all there is, and
there is nothing actually checked out.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-26  6:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-26  0:17 a few scenarios before I create my first repo [Scanned] Conor Rafferty
2008-12-26  0:46 ` Junio C Hamano
2008-12-26  1:07   ` Zorba
2008-12-26  6:00     ` Sitaram Chamarty
2008-12-26  2:07   ` Sitaram Chamarty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox