Skip to main content
you meant git not get
Source Link

###TLDR:

git pull is like running getgit fetch then git merge
git pull --rebase is like git fetch then git rebase

###In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


###For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."


###Now, if you wanted to ask *'the difference between `merge` and `rebase`'*

that is answered here too:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
(the difference between altering the way version history is recorded and what not)

###TLDR:

git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase

###In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


###For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."


###Now, if you wanted to ask *'the difference between `merge` and `rebase`'*

that is answered here too:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
(the difference between altering the way version history is recorded and what not)

###TLDR:

git pull is like running git fetch then git merge
git pull --rebase is like git fetch then git rebase

###In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


###For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."


###Now, if you wanted to ask *'the difference between `merge` and `rebase`'*

that is answered here too:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
(the difference between altering the way version history is recorded)

code formatting, formatting, add full command for context, Sumarize, last Q is referencing merge and rebase, not merge and fetch (rewrite vs not)
Source Link
SherylHohman
  • 18.2k
  • 18
  • 94
  • 102

In reply to your first statement,###TLDR:

git pull is like running get fetch then git merge
git pull --rebase is like a git fetch +then git mergerebase.

###In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


For###For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."

So:
git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase


Now###Now, if you wanted to ask the difference between fetch and merge, that is answered here too: https://git-scm.com/book/en/v2/Git-Branching-Rebasing (the *'the difference between altering the way version history is recorded`merge` and what not)`rebase`'*

that is answered here too:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
(the difference between altering the way version history is recorded and what not)

In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."

So:
git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase


Now, if you wanted to ask the difference between fetch and merge, that is answered here too: https://git-scm.com/book/en/v2/Git-Branching-Rebasing (the difference between altering the way version history is recorded and what not)

###TLDR:

git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase

###In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


###For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."


###Now, if you wanted to ask *'the difference between `merge` and `rebase`'*

that is answered here too:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
(the difference between altering the way version history is recorded and what not)

code formatting, formatting, add full command for context, Sumarize
Source Link
SherylHohman
  • 18.2k
  • 18
  • 94
  • 102

In reply to your first statement 'git pull is like a git fetch + git merge.', git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetchgit fetch followed by git mergegit merge FETCH_HEAD" More precisely, git pullgit pull runs git fetchgit fetch with the given parameters and then calls git mergegit merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


For your second statement/question: *'But *'But what is the difference between git pull`git pull` VS git fetch`git fetch` + git rebase'*`git rebase`'*

Again, from same source:
git pull --rebase

Again, from same source:

"With --rebase, it runs git rebase instead of git merge."

So:
git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase


Now, if you wanted to ask the difference between fetch and merge, that is answered here too: https://git-scm.com/book/en/v2/Git-Branching-Rebasing (the difference between altering the way version history is recorded and what not)

In reply to your first statement 'git pull is like a git fetch + git merge.',

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


For your second statement/question: *'But what is the difference between git pull VS git fetch + git rebase'* Again, from same source:

"With --rebase, it runs git rebase instead of git merge."


Now, if you wanted to ask the difference between fetch and merge, that is answered here too: https://git-scm.com/book/en/v2/Git-Branching-Rebasing (the difference between altering the way version history is recorded and what not)

In reply to your first statement, git pull is like a git fetch + git merge.

"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD" More precisely, git pull runs git fetch with the given parameters and then calls git merge to merge the retrieved branch heads into the current branch"

(Ref: https://git-scm.com/docs/git-pull)


For your second statement/question: *'But what is the difference between `git pull` VS `git fetch` + `git rebase`'*

Again, from same source:
git pull --rebase

"With --rebase, it runs git rebase instead of git merge."

So:
git pull is like running get fetch then git merge
git pull --rebase is like git fetch then git rebase


Now, if you wanted to ask the difference between fetch and merge, that is answered here too: https://git-scm.com/book/en/v2/Git-Branching-Rebasing (the difference between altering the way version history is recorded and what not)
Source Link
gawkface
  • 2.4k
  • 2
  • 28
  • 31
Loading