“git commit”与“git commit”之间有什么区别?和“git push”? [英] What are the differences between "git commit" and "git push"?

查看:186
本文介绍了“git commit”与“git commit”之间有什么区别?和“git push”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Git教程中,我使用 git commit 来存储您所做的更改。

什么是 git push 用于那么?

git commit 记录对存储库的更改,而 git push 更新远程引用以及关联对象。因此,第一个用于与本地存储库连接,而第二个用于与远程存储库进行交互。



以下是(我先介绍的文章)

In a Git tutorial I'm going through, git commit is used to store the changes you've made.

What is git push used for then?

解决方案

Basically git commit "records changes to the repository" while git push "updates remote refs along with associated objects". So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository.

Here is a nice picture from Oliver Steele, that explains the git model and the commands:

Read more about git push and git pull on GitReady.com (the article I referred to first)

这篇关于“git commit”与“git commit”之间有什么区别?和“git push”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆