Final merge for Issue #165 PR #165

This commit is contained in:
hilojack 2014-03-03 15:45:27 +08:00 committed by Peter Cottle
parent c029a5876f
commit f0913d4e4c
16 changed files with 1197 additions and 7 deletions

View file

@ -4,10 +4,12 @@ exports.level = {
"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": {
"en_US": "Pull arguments",
"zh_CN": "Pull arguments",
"de_DE": "Optionen für Pull"
},
"hint": {
"en_US": "Remember that you can create new local branches with fetch/pull arguments",
"zh_CN": "记住, 你可以通过fetch/pull创建本地分支",
"de_DE": "Du kannst neue lokale Branches mittels fetch / pull erstellen"
},
"startDialog": {
@ -85,6 +87,82 @@ exports.level = {
}
]
},
"zh_CN":{
"childViews": [
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## Git pull 参数",
"",
"现在你知道关于fetch/push几乎所有的东西了, 不过pull也有一个\"nothing\"呢!:)",
"",
"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.",
"因为 git pull 就是fetch后跟merge的缩写. 我可以认为执行git fetch 用了相同的参数, 然后再merge 你所fetch的提交(commit)",
"",
"这可以和其它更复杂的参数一起使用, 看看例子:"
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"Here are some equivalent commands in git:",
"以下命令在git中是等价的:",
"",
"`git pull origin foo` is equal to:",
"",
"`git fetch origin foo; git merge o/foo`",
"",
"还有...",
"",
"`git pull origin bar~1:bugFix` is equal to:",
"",
"`git fetch origin bar~1:bugFix; git merge bugFix`",
"",
"看到了? git pull 实际上就是fetch + merge的缩写, git pull 在乎的是提交在哪里结束(也就是git fetch所确定的destination)",
"",
"Lets see a demo:"
]
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"如果我们指定要提取的<place>, 所有的事情都会跟之前一样发生, 除了merge. "
],
"afterMarkdowns": [
"看! 通过指定master 我们更新了o/master. 然后我们merge `o/master` 到我们的检出分支(当前检出的任意分支). "
],
"command": "git pull origin master",
"beforeCommand": "git clone; go -b bar; git commit; git fakeTeamwork"
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"这也适用于source / destination 吗? 当然喽, 看看吧:"
],
"afterMarkdowns": [
" 哇, 这就一个命令. 我们在本地创建了一个叫foo的分支, 远端的master分支, 被下载到了本地foo分支. 然后再merge到我们的当前分支. 终于完啦!9000!!!"
],
"command": "git pull origin master:foo",
"beforeCommand": "git clone; git fakeTeamwork; go -b bar; git commit"
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"好啦, 做作业! 请获取虚拟目标. 你需要下载一些提交,然后创建一些新分支, 再合并这些分支到其它分支, 这花不了几个命令 :P "
]
}
}
]
},
"de_DE": {
"childViews": [
{