DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

The command git pull syncs any changes that are on the
remote repository and brings your local repository up to
the same level as the remote one. It has the following
syntax:


Click here to view code image


git pull (remotename) (branchname)

Whenever you begin to work with Git, one of the first
commands you want to issue is pull so you can get the
latest code from the remote repository and work with the
latest version of code from the master repository. git
pull does two things: fetches the latest version of the
remote master repository and merges it into the local
repository. If there are conflicts, they are handled just as
they would be if you issued the git merge command,
which is covered shortly. Example 2-4 shows an example
of using the git pull command.


Example 2-4 git pull Command

Click here to view code image


# git pull origin master
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 1), reused 0 (delta 0),
pack-reused 0
Unpacking objects: 100% (8/8), done.
From https://github.com/chrijack/devnetccna
* branch master -> FETCH_HEAD
8eb16e3..40aaf1a master ->
origin/master
Updating 8eb16e3..40aaf1a
Fast-forward
2README.md | 3 +++
Picture1.png | Bin 0 -
> 83650 bytes
Picture2.jpg | Bin 0 -
> 25895 bytes
Picture3.png | Bin 0 -
> 44064 bytes
4 files changed, 3 insertions(+)
create mode 100644 2README.md
create mode 100644 Picture1.png
Free download pdf