Re: Newbie to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<mysql.jorge@xxxxxxxxxx> writes:

> Hi Andreas,

If you are addressing Andreas, why does your mail have:

    To: <git@xxxxxxxxxxxxxxx>
    Cc: <git@xxxxxxxxxxxxxxx>

and no other addressee???

> not i have:
> /home/apache/gitprojects/mydir.git
>
> created with: git init --base mydir.git
>
> Now, inside here, what should i do to create my projects:
>
> mkdir myproject1
> cd myproject1
> git init
> touch a.txt
> git add .
> git commit -m "1st commit"
>
> am i correct or not really?

You created "myproject1" somewhere you started "mkdir" in (perhaps in
$HOME?) [*1*] and that project tracks a single file "a.txt"; you are
correct if that was what you wanted to do.

The new repository "myproject1" doesn't have any relation to the bare
repository at /home/apache/gitprojects/mydir.git/ you created earlier.
The next steps I recommend new people are:

 (1) push into the public repository, by doing:

     cd myproject1
     git push /home/apache/gitprojects/mydir.git/ master

 (2) make sure push went correctly by trying to clone from there:

     cd ..
     mv myproject1 myproject1.old
     git clone /home/apache/gitprojects/mydir.git/ myproject1

 (3) check if the clone is what you expect

     diff myproject1.old/a.txt myproject1/a.txt

 (4) once satisfied, remove the old one

     rm -fr myproject1.old

And keep working in the myproject1 repository from there on.


[Footnote]

*1* If you started that "mkdir" somewhere else you may want to remove it
and redo that step, especially if you did so inside that bare repository
you created earlier, i.e. /home/apache/gitprojects/mydir.git directory.
You don't want to have it there.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]