GIT - how to keep a file common across all branches

前端 未结 4 1630
故里飘歌
故里飘歌 2021-01-02 06:10

Suppose I have a file \"ChangeLog\" in branch \"master\". I want to record information about all changes in any branch in this file (in more detail than in a commit message

4条回答
  •  悲&欢浪女
    2021-01-02 06:56

    I know that this answer is begging the question, but I think that anything else is setting yourself up for a maintenance headache.

    If you put sufficient description into your commit messages then git log fits the requirement. All the changes that are in a particular branch are described exactly by the commits that go into it and it is impossible for it to be out of date or have descriptions for changes that aren't in it ascribed to it.

    Ever since I've moved to git I've given up maintaining a change log manually. For me, it had no value and significant cost.

    There is no reason not to put full descriptions in commits. With --amend you can fix up spelling errors and add detail, and if you stick to the convention of having a brief subject line and a fuller description then you can choose between short and long log formats.

提交回复
热议问题