开发者

TortoiseHG - Change previous commit's username?

开发者 https://www.devze.com 2023-02-28 11:32 出处:网络
I am pretty new to HG and when I initially set it up I didn\'t setup my username for my local repositories.My commits display the curre开发者_如何学运维nt logged in user and machine name.i.e. adam@myp

I am pretty new to HG and when I initially set it up I didn't setup my username for my local repositories. My commits display the curre开发者_如何学运维nt logged in user and machine name. i.e. adam@mypc and after setting my username I now have adam.

I would like to know if it is possible to change the previous commits that say adam@mypc to display adam.

I have multiple PCs that I work from and I'd like to keep all of the commits under the same username.

Thanks in advance.


The name of the committer isn't set at push time, it's set at commit time, and it's an unchangeable part of the changeset itself. You could re-write the changesets with new names (easiest would be using the convert command with an --authormap) but it will change hashes of those changesets and invalidate any clones out there. Going forward you can set that value as the username in the [ui] section of your ~/.hgrc file to make sure they're the same across all your machines.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号