mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Explain git pull default behaviour and the use of --rebase flag.
By far the pull command I use the most is 'git pull --rebase', so wanted to add some info to make it clear that that's possible.
This commit is contained in:
parent
f71ebeacdb
commit
674e8a0eeb
@ -310,7 +310,12 @@ Pulls from a repository and merges it with another branch.
|
|||||||
# Update your local repo, by merging in new changes
|
# Update your local repo, by merging in new changes
|
||||||
# from the remote "origin" and "master" branch.
|
# from the remote "origin" and "master" branch.
|
||||||
# git pull <remote> <branch>
|
# git pull <remote> <branch>
|
||||||
|
# git pull => implicitly defaults to => git pull origin master
|
||||||
$ git pull origin master
|
$ git pull origin master
|
||||||
|
|
||||||
|
# Merge in changes from remote branch and rebase
|
||||||
|
# branch commits onto your local repo, like: "git pull <remote> <branch>, git rebase <branch>"
|
||||||
|
$ git pull origin master --rebase
|
||||||
```
|
```
|
||||||
|
|
||||||
### push
|
### push
|
||||||
|
Loading…
Reference in New Issue
Block a user