How does GIT Push work?

前端 未结 3 1895
既然无缘
既然无缘 2021-01-13 19:51

I have a large project (several hundred MB), if I use a remote GIT repository, does GIT client push the entire directory even when you only make small change in a single fil

3条回答
  •  离开以前
    2021-01-13 20:04

    "Push" is Git's way of syncing repositories - in your case, syncing your local repo with one sitting on a remote server.

    Repository "updates" happen when you commit changes (actually, technically when you "add", but that's getting deeper than necessary). When you commit, Git is just storing information about the delta changes you've made since the last commit (it's not "duplicating" files). But that commit is only on your local machine until you push. When you push, Git is just syncing the updates you've made in your local repo with the repo on the remote server.

    Pro Git is an easy and great read, and it'll explain things like this nicely: http://progit.org/book/

提交回复
热议问题