简体   繁体   English

在 GitHub 上提交 Git

[英]Git commit on GitHub

I need to know that what if I create a repository on my device and keep making continuous commits to it.我需要知道,如果我在我的设备上创建一个存储库并不断对其进行提交会怎样。 For example, I created and finished a repository and made about 50 commits, but I haven't pushed it to GitHub yet, not even once.例如,我创建并完成了一个存储库并进行了大约 50 次提交,但我还没有将其推送到 GitHub,甚至一次都没有。 So if I push the repository after completing it, will the 50 commits show up on GitHub too?因此,如果我在完成后推送存储库,那么 50 次提交也会显示在 GitHub 上吗?

That's definitely yes.那绝对是的。 That's something we like on git.这是我们在 git 上喜欢的东西。

When you commit 50 times to your local git repo, you are essentially appending to the database.当您向本地 git 存储库提交 50 次时,您实际上是在追加到数据库中。 When you push your local repo to github, the entire local database is "copied" to github, including the 50 commits.当您将本地存储库推送到 github 时,整个本地数据库都会“复制”到 github,包括 50 次提交。

so the answer to your question is: yes, github will have a record of the 50 commits you made to your local repo.所以您的问题的答案是:是的,github 将记录您对本地存储库所做的 50 次提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM