Joan Lluch via llvm-dev
2019-Nov-08 16:39 UTC
[llvm-dev] Workflow to commit changes using git alone (?)
Hi Hiroshi, Thanks for that. I find “rebase” difficult to use. Maybe I don’t understand it, but it always causes a lot ‘conflicts’ that are very hard to fix according to my experience. I have another question though. LLVM requires that reviewed patches are pushed as a /single/ commit with a standardised message, particularly specifying the Differential Revision url as part of the commit message. How’s that done on your example? Thanks, John> On 8 Nov 2019, at 17:25, Hiroshi Yamauchi <yamauchi at google.com> wrote: > > Here's roughly what I currently would do to commit a patch in a local branch (which I don't think involves svn): > > $ git branch --set-upstream-to=origin/master patchbranch # Make the branch track upstream master > $ git pull --rebase # Rebase patchbranch against upstream master > $ git llvm push # Commit > > > > > > On Fri, Nov 8, 2019 at 3:35 AM Joan Lluch via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > Hi all, > > I have recently given commit access to LLVM and successfully pushed a test commit from my local master branch. > > However, I can’t find which is the recommended workflow for committing more serious stuff using git alone. I have read the docs but everything seems to still require svn before bridging to github. I want to use git alone to commit a patch that I got reviewed. > > I currently have a local 'master' branch that I keep identical to the upstream branch. I also have another local branch (let's call it 'patchbranch' for the purposes of this question) where I committed the changes for the patch I want to push. I created the diff file by running git diff to compare my local 'master' with 'patchbranch’ branches and uploaded the file to Phabricator. I got the patch reviewed and I want to commit it now to the upstream master. I make sure my 'patchbranch' catches all the upstream changes by pulling from 'master', merging 'master' into my 'patchbranch and running the relevant tests. > > I want to push my local 'patchbranch' to the upstream ‘master’ in GitHub without affecting my local master branch. I also need to make sure that my patch is pushed as a single commit. I do not want to merge my local 'patchbranch' into my local 'master' because I want to keep my local 'master' clean and always identical to, or only slightly behind, the upstream branch. > > I have read the documentation but all the described workflows seem to imply the use of svn at some point, which I do not want to, or know how to use. I understand this is a basic question but I used git before with small teams only, so a detailed workflow for LLVM commits using git alone would be appreciated. > > Thanks, > > John > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191108/aacebbed/attachment.html>
Hiroshi Yamauchi via llvm-dev
2019-Nov-11 17:18 UTC
[llvm-dev] Workflow to commit changes using git alone (?)
I use 'arc diff' to upload a patch to Phabricator, which I think adds the Differential Revision url to the commit message. On Fri, Nov 8, 2019 at 8:39 AM Joan Lluch <joan.lluch at icloud.com> wrote:> Hi Hiroshi, > > Thanks for that. I find “rebase” difficult to use. Maybe I don’t > understand it, but it always causes a lot ‘conflicts’ that are very hard to > fix according to my experience. I have another question though. LLVM > requires that reviewed patches are pushed as a /single/ commit with a > standardised message, particularly specifying the Differential Revision url > as part of the commit message. How’s that done on your example? > > Thanks, > > John > > > > > On 8 Nov 2019, at 17:25, Hiroshi Yamauchi <yamauchi at google.com> wrote: > > Here's roughly what I currently would do to commit a patch in a local > branch (which I don't think involves svn): > > $ git branch --set-upstream-to=origin/master patchbranch # Make the branch > track upstream master > $ git pull --rebase # Rebase patchbranch against upstream master > $ git llvm push # Commit > > > > > > On Fri, Nov 8, 2019 at 3:35 AM Joan Lluch via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi all, >> >> I have recently given commit access to LLVM and successfully pushed a >> test commit from my local master branch. >> >> However, I can’t find which is the recommended workflow for committing >> more serious stuff using git alone. I have read the docs but everything >> seems to still require svn before bridging to github. I want to use git >> alone to commit a patch that I got reviewed. >> >> I currently have a local 'master' branch that I keep identical to the >> upstream branch. I also have another local branch (let's call it >> 'patchbranch' for the purposes of this question) where I committed the >> changes for the patch I want to push. I created the diff file by running >> git diff to compare my local 'master' with 'patchbranch’ branches and >> uploaded the file to Phabricator. I got the patch reviewed and I want to >> commit it now to the upstream master. I make sure my 'patchbranch' catches >> all the upstream changes by pulling from 'master', merging 'master' into my >> 'patchbranch and running the relevant tests. >> >> I want to push my local 'patchbranch' to the upstream ‘master’ in GitHub >> without affecting my local master branch. I also need to make sure that my >> patch is pushed as a single commit. I do not want to merge my local >> 'patchbranch' into my local 'master' because I want to keep my local >> 'master' clean and always identical to, or only slightly behind, the >> upstream branch. >> >> I have read the documentation but all the described workflows seem to >> imply the use of svn at some point, which I do not want to, or know how to >> use. I understand this is a basic question but I used git before with small >> teams only, so a detailed workflow for LLVM commits using git alone would >> be appreciated. >> >> Thanks, >> >> John >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191111/88c9f178/attachment.html>
Joan Lluch via llvm-dev
2019-Nov-11 19:28 UTC
[llvm-dev] Workflow to commit changes using git alone (?)
Hi Hiroshi> On 11 Nov 2019, at 18:18, Hiroshi Yamauchi <yamauchi at google.com> wrote: > > I use 'arc diff' to upload a patch to Phabricator, which I think adds the Differential Revision url to the commit message. > >This is what I actually use, as I posted several messages earlier. John> > On Fri, Nov 8, 2019 at 8:39 AM Joan Lluch <joan.lluch at icloud.com <mailto:joan.lluch at icloud.com>> wrote: > Hi Hiroshi, > > Thanks for that. I find “rebase” difficult to use. Maybe I don’t understand it, but it always causes a lot ‘conflicts’ that are very hard to fix according to my experience. I have another question though. LLVM requires that reviewed patches are pushed as a /single/ commit with a standardised message, particularly specifying the Differential Revision url as part of the commit message. How’s that done on your example? > > Thanks, > > John > > > > >> On 8 Nov 2019, at 17:25, Hiroshi Yamauchi <yamauchi at google.com <mailto:yamauchi at google.com>> wrote: >> >> Here's roughly what I currently would do to commit a patch in a local branch (which I don't think involves svn): >> >> $ git branch --set-upstream-to=origin/master patchbranch # Make the branch track upstream master >> $ git pull --rebase # Rebase patchbranch against upstream master >> $ git llvm push # Commit >> >> >> >> >> >> On Fri, Nov 8, 2019 at 3:35 AM Joan Lluch via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> Hi all, >> >> I have recently given commit access to LLVM and successfully pushed a test commit from my local master branch. >> >> However, I can’t find which is the recommended workflow for committing more serious stuff using git alone. I have read the docs but everything seems to still require svn before bridging to github. I want to use git alone to commit a patch that I got reviewed. >> >> I currently have a local 'master' branch that I keep identical to the upstream branch. I also have another local branch (let's call it 'patchbranch' for the purposes of this question) where I committed the changes for the patch I want to push. I created the diff file by running git diff to compare my local 'master' with 'patchbranch’ branches and uploaded the file to Phabricator. I got the patch reviewed and I want to commit it now to the upstream master. I make sure my 'patchbranch' catches all the upstream changes by pulling from 'master', merging 'master' into my 'patchbranch and running the relevant tests. >> >> I want to push my local 'patchbranch' to the upstream ‘master’ in GitHub without affecting my local master branch. I also need to make sure that my patch is pushed as a single commit. I do not want to merge my local 'patchbranch' into my local 'master' because I want to keep my local 'master' clean and always identical to, or only slightly behind, the upstream branch. >> >> I have read the documentation but all the described workflows seem to imply the use of svn at some point, which I do not want to, or know how to use. I understand this is a basic question but I used git before with small teams only, so a detailed workflow for LLVM commits using git alone would be appreciated. >> >> Thanks, >> >> John >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191111/7436581d/attachment.html>