0

I set up a git repository and push,pull were working fine 2 days back. this is the first time I am using git and version control systems Now today when I copied some files in it and started pushing them,I noticed it was pushing 90mb data.I was genuinely surprised how this can be. Later I found that 90 mb size was due to .git folder. What is the reason of this? Am i doing something wrong? How can I stop pushing .git folder?

When above thing was not working i created a new folder and set up clone of my repository.I fetched my repository in it and it came fine. When I ran git status,it showed my full home folder as untracked files. Why is this happening?

codecool
  • 5,886
  • 4
  • 29
  • 40
  • Where do you push to? The `.git` folder contains the versioning-relevant information... – eckes Jul 22 '11 at 08:40
  • i push to online repository which i have set up. basically i need to push my local changes to repo so that my other developer can access it. – codecool Jul 22 '11 at 08:44

2 Answers2

1

When you push changes what happens is what you expect: it only transfers minimal the required changeset to the remote repository, so if you transfered 90 Mb it's because 90 Mb were needed.

The .git folder holds all the information about changeset, commits, and other info, and is not transfered at each push.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
  • so its not necessary that it will upload that everytime, its doing so right now because its needed? – codecool Jul 22 '11 at 12:09
0

Not so sure your case isn't already covered here. I refer to this (Git for beginners: The definitive practical guide) a lot - it's comprehensive and compact too.

Community
  • 1
  • 1
JWL
  • 13,591
  • 7
  • 57
  • 63