On its own, the git merge origin/master command does not affect local branches. The git merge origin/master integrates changes from the remote master branch to the current branch. You will have to specify a remote branch in such a situation. If you have not set up a remote tracking branch for your local branch, the git pull command on its own will fail. A remote-tracking branch is a branch in the remote repository to which your local branch pulls changes from and pushes changes to. The git pull command requires your local branch to have a remote tracking branch. It will store the commit at the tip of all the remote branches. In simpler terms, Fetch_Head is the reference that keeps track of what has been fetched. The git push command will fetch changes from the remote repository and invoke the git merge command to merge Fetch_Head to the checked-out local branch. the git pull CommandĪccording to the Git documentation, by default, the git pull command is a combination of two commands. We will start by dissecting each command to derive the key difference. Difference Between git merge origin/master and git pull This is the right place if you are new to Git and struggling with the two commands. However, each command operates uniquely and has different use cases, as we will discuss shortly. The two commands integrate changes from a remote repository to the current local branch. This article outlines the differences between the git merge origin/master and the git pull commands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |