Tuesday 15 July 2014

How to initialize local git repository and tell it it is already in sync with server? -


Listen to me!

I have a local folder that is the latest code. This same version of the code is present in the Master's Branch in the remote GIT repository. Now I want to initialize GIT locally, but I do not want to download all the codes again via GIT. Even if I add a remote repository after git init and try to get it, then before deciding whether to download it everything is in synchronization.

The code contains too many binary files.

The main reason for doing this is to save bandwidth but also to know how to do it.

How do I tell GIT - "It's already synchronizing with the latest in the server (or better - this special amendment on the server - take your word for it - and only later revise Edit?

Edit:

To be honest in reality, the server is committed to the same one - now what I would like to do is some example

Do it locally and tell Git that the server also commits the same (Because the file in the folder was exactly the same when it was previously committed) - obviously GIT does not know this yet because different IIDs are present locally on the server. If anyway I can check the change at the local level to see what it is on the server, it will solve my problem.

I am looking for anything or similar above, if possible,

I really do not want to "git clone" (and again all through the git Download files), even a shallow clone.

Edit 2:

Note that even after one, my guit folder has 182 MB. It is the compressed size of the whole repo - and my fear is that it is full The thing is getting re-downloaded (even if the same 182 MB .git file is already present locally, probably only ID ID is different).

You can not expect GT to work on the basis of your methodology alone! It requires a lot of metadata to work properly, including project history.

What you want is a shallow clone with it can be done with

  git clone --depth = 1 git: // some / repo  < / Pre> 

However, there are several important limitations. Shallow clones.

  • You can not pull them out
  • You can not drag them from
  • You can not reference project history without downloading more

No comments:

Post a Comment