I am working on a specific use case of automating code mgmt using git. I am not certain if git has this feature built in, or there is a product out there that does this already. I appreciate if you could point me towards the right direction.
The idea is simple, and the process as follows: (I understand this may not be the conventional way of using Git, and is a specific use case)
A scheduler commits the code from a shared-repo between users to GitLab (using scheduler user_id)
The day after users go through the applied changes to the code (using a GUI interface) and pick the changes made by them,
A script\code modifies the commit to adjust the Git-Blame output based on users' entires in step 2 (this step may require breaking the commit to multiple commits and changing user Author)
Any help would be highly appreciated.
I did use 'git_blame_someone_else' code and a combination of rebasing\cherrypicking, however, I thought I might be trying too hard and this could be a build in feature in Git. (breaking commits and changing code Author)
No, git does not have this feature built in. The closest I can think of is interactive rebasing, which can let you break one commit into several (and even give them different authors), but it's meant to be a manual process, not something you would generally do from a script.
To be fair, it seems horrendously inefficient to combine different people's commits into one, only to have to break those commits apart later. What I'd actually suggest doing is reexamining and questioning the reasons that the default git workflow, where different people's commits stay as separate commits, doesn't work for you. I suspect you may find a better solution to that higher-level problem such that you don't have to do what you're describing.