Re: Can I zip a git repo without losing anything?

2012-11-26 Thread Konstantin Khomoutov
On Mon, 26 Nov 2012 04:55:10 +
Carl Smith  wrote:

> After suggesting using zip files to move our projects around, I was
> told that you can not zip a git repo without loosing all the history.
> This didn't make sense to me, but two people told me the same thing,
> so I wasn't sure. I think they may have been confusing the zipped file
> you can download from GitHub with a zipped git repo.
> 
> If someone could put me straight on this, I'd really appreciate it.

To amend the already provided answer -- if you need to move repos
around using the sneakernet, the tool you should probably use is
`git bundle`.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Can I zip a git repo without losing anything?

2012-11-25 Thread Andrew Ardill
On 26 November 2012 15:55, Carl Smith  wrote:
> Hi all
>
> This is my first post to this list, so thank you for all your work.
>
> After suggesting using zip files to move our projects around, I was
> told that you can not zip a git repo without loosing all the history.
> This didn't make sense to me, but two people told me the same thing,
> so I wasn't sure. I think they may have been confusing the zipped file
> you can download from GitHub with a zipped git repo.

Hi Carl,

The basics of it are as follows, a little simplified to hopefully make it clear

Git uses a working directory that contains the files which you are
working on. These get converted into a snapshot when you commit, and
these commits form the history of your project. These snapshots along
with everything else that git needs to work are stored in the git
directory, often called ".git".

When you zip the files you are working on you are creating a manual
snapshot of your project. If you zip the git directory you are
compressing the entire git repository and this has enough information
to recreate your entire history. If you zip both of them you get your
history as well as any changes that have not been committed yet. When
a server holds a copy of your repository it will not include a working
directory at all, but instead just the git directory. In this
situation the git directory will often be called the same name as the
project.

The zip from GitHub does indeed only contain the working directory,
and so doesn't include the history.

Hope that helps!

Regards,

Andrew Ardill
Regards,

Andrew Ardill
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Can I zip a git repo without losing anything?

2012-11-25 Thread Carl Smith
Hi all

This is my first post to this list, so thank you for all your work.

After suggesting using zip files to move our projects around, I was
told that you can not zip a git repo without loosing all the history.
This didn't make sense to me, but two people told me the same thing,
so I wasn't sure. I think they may have been confusing the zipped file
you can download from GitHub with a zipped git repo.

If someone could put me straight on this, I'd really appreciate it.

Thanks

Carl
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html