Exclude package-lock.json from GitHub contribution activity

后端 未结 2 1719
一整个雨季
一整个雨季 2021-02-05 07:41

Now that npm v5.0.0 is out, using npm packages auto-generates a package-lock.json on npm install. In my case, my package-lock.json file ha

相关标签:
2条回答
  • 2021-02-05 08:16

    Run

    git config --global user.email "you@example.com"
    
    git config --global user.name "Your Name"
    

    to set your account's default identity.

    Omit --global to set the identity only in this repository.

    0 讨论(0)
  • 2021-02-05 08:31

    One way to exclude a file from modifying a user's contribution activity is by associating the commit with a placeholder author. This can be done by providing an empty email field <> in the --author option.

    The signature of the --author option: --author="NAME <EMAIL>"

    git add package-lock.json
    git commit -m 'initial commit' --author='nocontribute <>'
    

    FOO_AUTHOR committed with REAL_AUTHOR x time ago.

    0 讨论(0)
提交回复
热议问题