{"thread":{"id":"7521","subject":"Reomanded usage?","startedAt":"2007-04-05T09:49:13Z","lastAt":"2007-04-05T09:49:13Z","messageCount":1,"participants":["MichaelTiloDressel@t-online.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"38694","messageId":"1HZOaf-18TkBc0@fwd26.aul.t-online.de","threadId":"7521","inReplyTo":null,"subject":"Reomanded usage?","fromName":"MichaelTiloDressel@t-online.de","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2007-04-05T09:49:13Z","receivedAt":"2007-04-05T09:49:13Z","isPatch":false,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"Hi,\n\nI would like to get your opinion on the way I used cogito in the\nfollowing \nexample. In particular I would like to know if the command\n\"cg-switch -fr origin master\" is the recommended usage in this case.\n\nThe situation: I have cloned a repository from some \"original\" repo.\nI made some changes and committed them into my repo. Now I don't want to\n\npush my changes into the \"original\" repo but instead I want to get\nthe latest changes from the \"original\" repo (with out my changes) and\ncontinue \nto work on them. I want to keep my changes to be able to introduce\nthem into the \"original\" repo at some later point.\n\nI think I need to create a branch with my changes. With the master\nbranch I \nneed to go back to where I started from the \"original\" repo. And then \nI can update my master from the \"original\" repo.\n\nThat's the way I did it:\n\ncg-status\nHeads:\n    >master     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n# do some changes  \n\ncg-commit -m .....\nCommitted as 7002e00d13e1227349897996db0fb27e9a1232a9\ncg-status\nHeads:\n    >master     7002e00d13e1227349897996db0fb27e9a1232a9\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n# more changes\n\ncg-commit -m ..........\nCommitted as c43629cb3a382e89b13eef1193122db1bba8a243\ncg-status\nHeads:\n    >master     c43629cb3a382e89b13eef1193122db1bba8a243\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n\n# now I want to go back to the commit before my changes and update\n# to the latest commit in the origin and go on with some other work from\n\n# that latest commit\n# and keep my changes in a local branch (or head)\n\n# create new head using cg-switch\n\ncg-switch -c expect\nCreating new branch expect: c43629cb3a382e89b13eef1193122db1bba8a243\nSwitching to branch expect...\ncg-status\nHeads:\n    >expect     c43629cb3a382e89b13eef1193122db1bba8a243\n     master     c43629cb3a382e89b13eef1193122db1bba8a243\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n# go back to my master\n\ncg-switch master\nSwitching to branch master...\ncg-status\nHeads:\n     expect     c43629cb3a382e89b13eef1193122db1bba8a243\n    >master     c43629cb3a382e89b13eef1193122db1bba8a243\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n# now reset the master to the origin I started from\n\ncg-switch -fr origin master\nRepointing branch master: c43629cb3a382e89b13eef1193122db1bba8a243 ->\n0176cac7fd\ndc64d55ff5cad49e04567c402c3970\nSwitching to branch master...\ncg-status \nHeads:\n     expect     c43629cb3a382e89b13eef1193122db1bba8a243\n    >master     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R origin     0176cac7fddc64d55ff5cad49e04567c402c3970\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n# update my master with the current commit in the original repository\n\ncg-update\nFetching pack (head and objects)...\nremote: Generating pack...\nremote: Done counting 1 objects.\nremote: Deltifying 1 objects.\nremote:  100% (1/1) done\nremote: Total 1 (delta 0), reused 0 (delta 0)\nUnpacking 1 objects\n 100% (1/1) done\nFetching tags...\nTree change:\n0176cac7fddc64d55ff5cad49e04567c402c3970..9495c6fd42aefa745d937bf7b\nb50ea138b4dc919\n\nApplying changes...\nFast-forwarding 0176cac7fddc64d55ff5cad49e04567c402c3970 ->\n9495c6fd42aefa745d93\n7bf7bb50ea138b4dc919\n        on top of 0176cac7fddc64d55ff5cad49e04567c402c3970 ...\ncg-status\nHeads:\n     expect     c43629cb3a382e89b13eef1193122db1bba8a243\n    >master     9495c6fd42aefa745d937bf7bb50ea138b4dc919\n   R origin     9495c6fd42aefa745d937bf7bb50ea138b4dc919\n   R otest      25ea047321cd15dd32eb7d6e0b51d86ee1668453\n\n\nBest regards,\nMichael\n"}]}