Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git says project description file hasn't been modified even when it is actually modified

Tags:

git

I am on Mac OS X 10.5.5, and when I try to do a git push (I have installed git via git installer available on google code), it shows me the following error

Counting objects: 86, done.
Compressing objects: 100% (43/43), done.
Writing objects: 100% (84/84), 4.68 MiB | 48 KiB/s, done.
Total 84 (delta 37), reused 84 (delta 37)
*** Project description file hasn't been set
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/master
To <my_git_server>:project_name.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '<my_git_server>'

The mystery is that project description file is actually set, any idea why it might be behaving weird.

--
MI


1 Answers

It is looking at the project description on the server; does <my_git_server>:project_name.git contain a file called description that contains something other than "Unnamed repository"?

If it does, and you're still having problems, you could disable the check for a description altogether; it's not essential. Comment out the following lines in project_name.git/hooks/update:

# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
        echo "*** Project description file hasn't been set" >&2
        exit 1
        ;;
esac
like image 159
Brian Campbell Avatar answered Dec 08 '25 19:12

Brian Campbell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!