Cool!

I also have two git alias to change exist commit.

        append = "!f() { git reset --soft HEAD~1; git commit -am \"$(git
log --format=%B --reverse HEAD..HEAD@{1})\"; }; f"

could append you local change to last exist commit in current patch.

So the work flow to update exist review board could be:

# write some code to exist branch.
git append
git fetch origin master:master && git rebase master
post_review

And this alias is squal several commits to one more convenient, sometimes I
use it and git amend to change the branch history.


rb = "!f() { git reset --soft HEAD~$1; git commit -m \"$(git log
--format=%B --reverse HEAD..HEAD@{2})\"; }; f"


On Sat, Aug 8, 2015 at 1:19 AM, Joris Van Remoortere <[email protected]>
wrote:

> This is the worflow I usually share with people:
>
> Updating a review after comments:
> `git checkout master`
> `git fetch apache`
> `git rebase apache/master`
> 'git checkout <your-branch-name>`
> `git rebase master`
> <resolve any rebase issues>
> `git rebase -i HEAD^^^^^` (number of `^` based on how far back you want to
> pick
> <switch `pick` with `edit` on the commit you want to modify>
> <save the interactive edit file>
> <now all your file states are as if the commit you chose to `edit` just got
> applied>
> <make any changes you want to the file>
> `git add <all-files-changed>`
> 'git rebase --continue`
> <now you have applied forward all your commits again, and are in a clean
> state>
> <now you can run post-reviews.sh>
>
> where:
> apache https://git-wip-us.apache.org/repos/asf/mesos.git
>
>
> On Fri, Aug 7, 2015 at 10:09 AM, Khanduja, Vaibhav <
> [email protected]
> > wrote:
>
> > Hi
> >
> > I am updating a diff on review board on an existing. I understand, the
> > existing commits should be adjusted before executing post_review.py. I am
> > having few issues here with adjusting the commits, and wondering if
> > somebody could guide me with commands which should be used to adjust the
> > commit?
> >
> > Thanks
> >
>



-- 
Best Regards,
Haosdent Huang

Reply via email to