![git bash tutorial clone pull push git bash tutorial clone pull push](https://i.imgur.com/45YjU3E.png)
In this diagram, we can now see that a rebase pull does not create the new H commit. Assume that we are at a starting point of our first diagram, and we have executed git pull -rebase.
![git bash tutorial clone pull push git bash tutorial clone pull push](https://webkul.com/blog/wp-content/uploads/2019/05/screenshot-192.168.1.79-2019.05.14-16-01-40.png)
The next example will demonstrate how a rebase pull works. A -rebase option can be passed to git pull to use a rebase merging strategy instead of a merge commit. This example is one of a few git pull merging strategies. This commit is a new merge commit that contains the contents of remote A-B-C commits and has a combined log message.
![git bash tutorial clone pull push git bash tutorial clone pull push](https://1v5ymx3zt3y73fq5gy23rtnc-wpengine.netdna-ssl.com/wp-content/uploads/2021/07/CheckingRemoteRepositoryafter-768x258.png)
In the above diagram, we can see the new commit H. The pull process will then create a new local merge commit containing the content of the new diverged remote commits. git pull will fetch the diverged remote commits which are A-B-C. In this scenario, git pull will download all the changes from the point where the local and main diverged. Assume we have a repository with a main branch and a remote origin. To better demonstrate the pull and merging process let us consider the following example. Then a git merge is executed to merge the remote content refs and heads into a new local merge commit. The git pull command first runs git fetch which downloads content from the specified remote repository. A new merge commit will be-created and HEAD updated to point at the new commit. Once the content is downloaded, git pull will enter a merge workflow. In the first stage of operation git pull will execute a git fetch scoped to the local branch that HEAD is pointed at. The git pull command is actually a combination of two other commands, git fetch followed by git merge. Merging remote upstream changes into your local repository is a common task in Git-based collaboration work flows.
#GIT BASH TUTORIAL CLONE PULL PUSH UPDATE#
The git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content.