mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
last level for remotes??
This commit is contained in:
parent
dc8df68dac
commit
1e152858a2
3 changed files with 31 additions and 7 deletions
|
@ -151,7 +151,7 @@ var Visualization = Backbone.View.extend({
|
||||||
|
|
||||||
fadeTreeIn: function() {
|
fadeTreeIn: function() {
|
||||||
this.shown = true;
|
this.shown = true;
|
||||||
if (!this.paper.canvas) {
|
if (!this.paper) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(this.paper.canvas).animate({opacity: 1}, this.getAnimationTime());
|
$(this.paper.canvas).animate({opacity: 1}, this.getAnimationTime());
|
||||||
|
|
|
@ -43,7 +43,8 @@ exports.levelSequences = {
|
||||||
require('./remote/pushArgs').level,
|
require('./remote/pushArgs').level,
|
||||||
require('./remote/pushArgs2').level,
|
require('./remote/pushArgs2').level,
|
||||||
require('./remote/fetchArgs').level,
|
require('./remote/fetchArgs').level,
|
||||||
require('./remote/sourceNothing').level
|
require('./remote/sourceNothing').level,
|
||||||
|
require('./remote/pullArgs').level
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
exports.level = {
|
exports.level = {
|
||||||
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null},\"o/bar\":{\"target\":\"C1\",\"id\":\"o/bar\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C3\",\"id\":\"master\",\"remoteTrackingBranchID\":null},\"bar\":{\"target\":\"C3\",\"id\":\"bar\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}}",
|
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C6\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null},\"o/bar\":{\"target\":\"C1\",\"id\":\"o/bar\",\"remoteTrackingBranchID\":null},\"foo\":{\"target\":\"C3\",\"id\":\"foo\",\"remoteTrackingBranchID\":null},\"side\":{\"target\":\"C2\",\"id\":\"side\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C4\":{\"parents\":[\"C1\"],\"id\":\"C4\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"},\"C5\":{\"parents\":[\"C3\",\"C4\"],\"id\":\"C5\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C6\":{\"parents\":[\"C2\",\"C5\"],\"id\":\"C6\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\",\"remoteTrackingBranchID\":null},\"bar\":{\"target\":\"C3\",\"id\":\"bar\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bar\",\"id\":\"HEAD\"}}}",
|
||||||
"solutionCommand": "git clone;git fakeTeamwork 2",
|
"solutionCommand": "git pull origin bar:foo;git pull origin master:side",
|
||||||
|
"startTree": "{\"branches\":{\"master\":{\"target\":\"C4\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null},\"o/bar\":{\"target\":\"C1\",\"id\":\"o/bar\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C4\":{\"parents\":[\"C1\"],\"id\":\"C4\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\",\"remoteTrackingBranchID\":null},\"bar\":{\"target\":\"C3\",\"id\":\"bar\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bar\",\"id\":\"HEAD\"}}}",
|
||||||
"name": {
|
"name": {
|
||||||
"en_US": "Push arguments"
|
"en_US": "Push arguments"
|
||||||
},
|
},
|
||||||
|
@ -18,9 +19,31 @@ exports.level = {
|
||||||
"",
|
"",
|
||||||
"Now that you know pretty much *everything* there is to know about arguments for `git fetch` and `git push`, there's almost really nothing left to cover for git pull :)",
|
"Now that you know pretty much *everything* there is to know about arguments for `git fetch` and `git push`, there's almost really nothing left to cover for git pull :)",
|
||||||
"",
|
"",
|
||||||
"That's because git pull at the end of the day is *really* just shorthand for a fetch followed by merging in whatever was just fetched.",
|
"That's because git pull at the end of the day is *really* just shorthand for a fetch followed by merging in whatever was just fetched. You can think of it as running git fetch with SAME arguments specified and then merging in *where* those commits ended up.",
|
||||||
"",
|
"",
|
||||||
"This applies when you use crazy-complicated arguments as well. Let's see some examples:"
|
"This applies even when you use crazy-complicated arguments as well. Let's see some examples:"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ModalAlert",
|
||||||
|
"options": {
|
||||||
|
"markdowns": [
|
||||||
|
"Here are some equivalent commands in git:",
|
||||||
|
"",
|
||||||
|
"`git pull origin foo` is equal to:",
|
||||||
|
"",
|
||||||
|
"`git fetch origin foo; git merge o/foo`",
|
||||||
|
"",
|
||||||
|
"And...",
|
||||||
|
"",
|
||||||
|
"`git pull origin bar~1:bugFix` is equal to:",
|
||||||
|
"",
|
||||||
|
"`git fetch origin bar~1:bugFix; git merge bugFix`",
|
||||||
|
"",
|
||||||
|
"See? git pull is really just shorthand for fetch + merge, and all git pull cares about is where the commits ended up (the `destination` argument that it figures out during fetch)",
|
||||||
|
"",
|
||||||
|
"Lets see a demo:"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -28,7 +51,7 @@ exports.level = {
|
||||||
"type": "GitDemonstrationView",
|
"type": "GitDemonstrationView",
|
||||||
"options": {
|
"options": {
|
||||||
"beforeMarkdowns": [
|
"beforeMarkdowns": [
|
||||||
"If we specify the place to fetch, everything happens as before but we merge in whatever was just fetched"
|
"If we specify the place to fetch, everything happens as before with fetch but we merge in whatever was just fetched"
|
||||||
],
|
],
|
||||||
"afterMarkdowns": [
|
"afterMarkdowns": [
|
||||||
"See! by specifying `master` we downloaded commits onto `o/master` just as normal. Then we merged `o/master` to where we are, *regardless* of what was currently checked out."
|
"See! by specifying `master` we downloaded commits onto `o/master` just as normal. Then we merged `o/master` to where we are, *regardless* of what was currently checked out."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue