colon refspec

This commit is contained in:
Peter Cottle 2013-10-24 10:48:01 -07:00
parent 1c4cf46550
commit dc33d8b78d

View file

@ -0,0 +1,46 @@
exports.level = {
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
"solutionCommand": "git commit ",
"name": {
"en_US": "asd"
},
"hint": {
"en_US": ""
},
"startDialog": {
"en_US": {
"childViews": [
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## `<place>` argument details",
"",
"Remember from the previous lesson that when we specified `master` as the place argument for git push, we specified both the *source* of where the commits would come from and the *destination* of where the commits would go.",
"",
"You might then be wondering -- what if we wanted the source and destination to be different? What if you wanted to push commits from the `foo` branch locally onto the `bar` branch on remote?",
"",
"Well unfortunately that's impossible in git... just kidding! Of course it's possible :)... git has tons and tons of flexibility (almost too much).",
"",
"Let's see how in the next slide..."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"In order to specify both the source and the destination of `<place>`, simply join the two together with a colon:",
"",
"`git push origin <source>:<destination>`",
"",
"This is commonly referred to as a colon refspec. Refspec is just a fancy name for a location that git can figure out (like the branch `foo` or even just `HEAD~1`)",
"",
"Once you are specifying both the source and destination independently, you can get quite fancy and precise with remote commands. Let's see a demo!"
]
}
}
]
}
}
};