July 13, 2022 . 1 MIN READ
git pullThe git pull command is used to fetch changes from a remote repository and automatically integrate them into your current local branch.
The changes are always applied to the branch you currently have checked out (your HEAD branch). By default, Git uses a merge strategy, but it can also be configured to use rebase instead.
The source branch (the remote branch you want to pull from) can be specified in the command. However, if your local branch already has a tracking relationship with a remote branch, you don’t need to specify it each time.
--no-ff
Forces Git to create a merge commit, even if a fast-forward merge is possible.
--rebase
Applies changes using rebase instead of merge, keeping a cleaner commit history.
Before running git pull, make sure you are on the correct branch:
In most cases, your local branch is already linked to a remote branch. This means you can simply run:
and Git will automatically pull changes from the configured remote branch.
Reference:
https://www.git-tower.com/learn/git/commands/git-pull