Use a separate branch for deployment

I am going to configure and configure the build environment for the client. I want to push the Git repository to the client build server, but without a complete Git history.

I’m thinking about approaching with git checkout --orphan ci, but I don’t understand how to work on a daily basis with such a branch installation.

Maybe something like this (?):

  • New commits will be created on master.
  • The function ends after several commits.
  • Then the branch is cireinstalled / merged (redirected) to master.
  • ci withdrawn.
  • Recent commits (which have not yet been clicked on to any server) are compressed to hide unnecessary client history.
  • From the branch, it is cidelivered to the build server.
  • ...

Is this a valid approach and / or is there an easier way?

+5
2

:

  • master ( ).
  • , CI, :

    • git checkout ci
    • git merge --squash master master ci.
    • git commit . , .
    • git push origin ci CI.

, , .

, .

+6

All Articles