iam
iam copied to clipboard
some docs need to update
When I was fixing a bug, I encountered the problem that the code could not be pushed to the remote repository.
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/cyb0225/iam-1.git'
I trid to find the solution and successfully I found the .git/hooks/commit-msg file.
# Copyright 2020 Lingfei Kong <[email protected]>. All rights reserved.
# Use of this source code is governed by a MIT style
# license that can be found in the LICENSE file.
# Store this file as .git/hooks/commit-msg in your repository in order to
# enforce checking for proper commit message format before actual commits. You
# may need to make the script executable by 'chmod +x .git/hooks/commit-msg'.
# commit-msg use go-gitlint tool, install go-gitlint via `go get github.com/llorllale/go-gitlint/cmd/go-gitlint`
go-gitlint --msg-file="$1"
I installed go-gitlint according to the comments, but it didn't work. And I found that in the higher version of the go language installation tool should use "go install" instead of "go get".
So I think some docs may be too old to solve problems.