Search code examples
gitbranchgerrit

How to commit changes to the master branch in Gerrit?


I want to get whatever changes made in the feature branch into my master branch, then review the changes and then commit them. Could someone please share me the commands for GIT, to achieve this requirement? I would also want to get it reviewed before performing the actual merge. Any help will be appreciated!

Thanks!


Solution

  • Maybe I understand your problem: review the result before the actual merge.

    Please switch to your master branch. You use following command.

    git merge --no-commit feature branch
    

    Now, you can review the result and commit what you want.

    You can return to previous state with

    git reset --hard