mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 23:48:34 +02:00
level content work
This commit is contained in:
parent
a7a07e9f92
commit
241a2dcd1c
2 changed files with 30 additions and 18 deletions
|
@ -19,7 +19,9 @@ exports.level = {
|
|||
"",
|
||||
"Working with git remotes really just boils down to transferring data _to_ and _from_ other repositories. As long as we can send commits back and forth, we can share any type of update that is tracked by git (and thus share work, new files, new ideas, love letters, etc etc).",
|
||||
"",
|
||||
"In this lesson we will learn how to fetch data _from_ a remote repository -- the command for this is conveniently named `git fetch`."
|
||||
"In this lesson we will learn how to fetch data _from_ a remote repository -- the command for this is conveniently named `git fetch`.",
|
||||
"",
|
||||
"You'll notice that as we update our representation of the remote repository, our _remote_ branches will update to reflect that new repsentation. This ties into the previous lesson on remote branches"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -30,7 +32,7 @@ exports.level = {
|
|||
"Before getting into the details of `git fetch`, let's see it in action! Here we have a remote repository that contains two commits that our local repository does not have."
|
||||
],
|
||||
"afterMarkdowns": [
|
||||
"There we go! Commits `C2` and `C3` were downloaded to our local repository, and our remote branch was updated to reflect the status of the remote repository."
|
||||
"There we go! Commits `C2` and `C3` were downloaded to our local repository, and our remote branch `o/master` was updated to reflect this."
|
||||
],
|
||||
"command": "git fetch",
|
||||
"beforeCommand": "git clone; git fakeTeamwork 2"
|
||||
|
@ -49,7 +51,9 @@ exports.level = {
|
|||
"",
|
||||
"`git fetch` essentially it brings our _local_ representation of the remote repository into synchronization with what the _actual_ remote repository looks like (right now).",
|
||||
"",
|
||||
"It does this by talking to the remote repository, usually through the internet (via a protocol like `http://` or `git://`).",
|
||||
"If you remember from the previous lesson, we said that remote branches reflect the state of the remote repositories _since_ you last talked to those remotes. `git fetch` is the way you talk to these remotes! Hopefully the connection between remote branches and `git fetch` is apparent now",
|
||||
"",
|
||||
"`git fetch` usually talks to the remote repository through the internet (via a protocol like `http://` or `git://`).",
|
||||
""
|
||||
]
|
||||
}
|
||||
|
@ -60,11 +64,11 @@ exports.level = {
|
|||
"markdowns": [
|
||||
"### What fetch doesn't do",
|
||||
"",
|
||||
"`git fetch`, however, does not change anything about _your_ local repository. It will not update your `master` branch or change anything about how your filesystem looks right now.",
|
||||
"`git fetch`, however, does not change anything about _your_ local state. It will not update your `master` branch or change anything about how your filesystem looks right now.",
|
||||
"",
|
||||
"This is important to understand because a lot of developers think that running `git fetch` will make their local repository reflect the state of `origin`. It may download all the necessary data to do that, but it does _not_ actually change any of your local files.",
|
||||
"This is important to understand because a lot of developers think that running `git fetch` will make their local work reflect the state of the remote. It may download all the necessary data to do that, but it does _not_ actually change any of your local files. We will learn commands in later lessons to do just that :D",
|
||||
"",
|
||||
"So in this sense, you can think of running `git fetch` as a download step. The steps to reflect the changes of the newly-downloaded commits will explained in following lessons :D"
|
||||
"So at the end of the day, you can think of running `git fetch` as a download step."
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue