{"thread":{"id":"52281","subject":"Please provide a one-liner for syncing with the original/source project","startedAt":"2019-11-17T20:57:01Z","lastAt":"2019-11-18T10:59:38Z","messageCount":2,"participants":["Jeffrey Walton","Pratyush Yadav"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"386399","messageId":"CAH8yC8m45JGwjd-vRaE-05=MmDHq4qxWBh-wtsK09xuW+mp3mg@mail.gmail.com","threadId":"52281","inReplyTo":null,"subject":"Please provide a one-liner for syncing with the original/source project","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2019-11-17T20:56:48Z","receivedAt":"2019-11-17T20:57:01Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"Hi Everyone,\n\nOne of my common workflows is, clone a open source project like Git,\nOpenSSL, etc. Then make some changes and push my changes to my clone.\nAnd maybe submit a pull request to the original/source project. After\nthe initial clone my project becomes out-of-sync with the project of\ninterest.\n\nI have to do something special to get my copy of the project back\nin-sync with the original/source project. It is not trivial to get\nback in sync. It takes three or four separate commands if all goes\nwell. And in my case, I have to look up the instructions because they\nare not ingrained in memory (like\nhttps://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).\n\nThis sync workflow is so common Git should be providing it. Anyone who\nhas cloned from GitHub, GitLab, etc needs it. Folks should not need to\ndo special things for common workflows. When sites like GitHub and\nGitLab are providing explicit instructions to sync with the\noriginal/source project should signal it is common and people need it.\n\nI'd like a one-line command to resync with the original or source\nproject (and not my clone). I think a 'git sync' command would be a\ngood addition to the Git tools.\n\nIt would be nice if sites like GitHub would value add the ' upstream =\n...' to a .git/config, but that is not Git's problem. I'll settle for\nmanually adding upstream so 'git sync' just works.\n\nThanks in advance.\n"},{"id":"386444","messageId":"20191118105931.kslaxyniesbzjauo@yadavpratyush.com","threadId":"52281","inReplyTo":"CAH8yC8m45JGwjd-vRaE-05=MmDHq4qxWBh-wtsK09xuW+mp3mg@mail.gmail.com","subject":"Re: Please provide a one-liner for syncing with the original/source project","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-11-18T10:59:31Z","receivedAt":"2019-11-18T10:59:38Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 17/11/19 03:56PM, Jeffrey Walton wrote:\n> Hi Everyone,\n> \n> One of my common workflows is, clone a open source project like Git,\n> OpenSSL, etc. Then make some changes and push my changes to my clone.\n> And maybe submit a pull request to the original/source project. After\n> the initial clone my project becomes out-of-sync with the project of\n> interest.\n> \n> I have to do something special to get my copy of the project back\n> in-sync with the original/source project. It is not trivial to get\n> back in sync. It takes three or four separate commands if all goes\n> well. And in my case, I have to look up the instructions because they\n> are not ingrained in memory (like\n> https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).\n\nFWIW, these multiple steps can be replaced by 'git pull upstream \nmaster', assuming you have 'master' checked out locally.\n \n> This sync workflow is so common Git should be providing it. Anyone who\n> has cloned from GitHub, GitLab, etc needs it. Folks should not need to\n> do special things for common workflows. When sites like GitHub and\n> GitLab are providing explicit instructions to sync with the\n> original/source project should signal it is common and people need it.\n> \n> I'd like a one-line command to resync with the original or source\n> project (and not my clone). I think a 'git sync' command would be a\n> good addition to the Git tools.\n\nWhat would 'git sync' do that 'git pull upstream' or 'git pull --rebase \nupstream' can not do?\n \n> It would be nice if sites like GitHub would value add the ' upstream =\n> ...' to a .git/config, but that is not Git's problem. I'll settle for\n> manually adding upstream so 'git sync' just works.\n> \n> Thanks in advance.\n\n-- \nRegards,\nPratyush Yadav\n"}]}