Introduction

Introduction (简介)

Git gives the opportunities to share branches between repositories instead of sharing a single changeset. In this chapter, we will learn about the set of commands that have their responsibilities in the syncing process. Find detailed information about the commands on our next pages. (Git提供了在存储库之间共享分支的机会,而不是共享单个变更集。在本章中,我们将了解在同步过程中负有责任的一组命令。有关命令的详细信息,请参阅我们的下一页。)

git remote

git remote

The git remote command is designed for creating, viewing and removing connections to other repositories. By default, it lists all the remote connections that have previously been stored to other repositories.

git fetch

git fetch

The git fetch command is used to download commits, files and references from the remote repository into the local repository. It displays what other members of the team have been working on. Both git fetch and git pull are used for downloading the content from the remote repository. The git fetch command just shows the progression of the central history while the git pull command not only downloads the new content but also directly integrates it into the current working copy.

git push

git push

The git push command is used to upload the content of the local repository to the remote repository. If git fetch imports the content to the local branches, git push exports it to the remote branches. After the changes are made in the local repository, you can invoke git push to share the modification with other members of the team. The git push command is one of the commands that are involved in the “syncing” process. These commands work on the remote branches that are configured with the git remote command.

git pull

git pull

The git pull command fetches and downloads content from the remote repository and integrates changes into the local repository. The git pull command is called as the combination of git fetch followed by git merge. It is one of the commands taking part in the syncing process.



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部