Not very practical, but you may even automatize that with scripts.Ä®DIT: Of course an even better approach as appointed by would be to use a configuration management system like Puppet or Chef and use git to track the changes on the central server and not on the real servers so each admin could have a working copy of the configuration. How to change the commit author for a single commit Ask Question Asked 13 years ago Modified 1 month ago Viewed 1.5m times 2954 I want to change the author of one specific commit in the history. 1.1.1 prettyoneline Pretty print commit log in a âsingle lineâ Command: git log -prettyoneline Formats the output in sequence: 1.1.2 prettyshort Format commit output âshortâ in the format: commit (refname) Author: As each one is using a specific shell, they can sudo to root and source a file with their specific git variables, identifying each one differently on the commits. Of course that means you trust your admins to keep the variables intact. By default, git log shows a lot of info about each committhe ref ID, the author, the date, the commit message, and if itâs the HEAD of any branches. In the log, it will appear different authors and the same commiter ( but it will give you more auditing. In case you are using the Tower Git client, you can create and manage multiple Committer Identities - one for work, one for side projects, one for Open Source. You can also carefully use environment variables per user to set GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL variables. git log -author, Searches for commits by a specified author. To change the author of the most recent commit in Git, run: git commit -amend -author'New Author Name <>' -no-edit To do this to any earlier commit in the commit history happens with the same command, but requires doing some checkouts, replacements, and rewrites.That said, git commit has a -author option that can help you there: # git commit -author='Author Name ' -a Usage git log -p, Shows the patch for each commit as well as their full diff. Restrict your root logins to console only, or not even that. First, and not related to your question, I would urge you to urgently stop to use root logins and su and use user logins and sudo instead.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |