I would like to upload a locally modified GIT description file (i.e.: .git/description
) to the remote.
For testing purpose, I created a brand new bare local repository:
$ mkdir test-remote && cd $_
$ git init --bare
Then, I:
- cloned it to a specific directory.
- made some changes to the cloned
.git/description
. - created an empty commit on a new
master
branch. - pushed
master
changes toorigin
.
$ git clone --local ./test-remote test
$ git checkout -b master
$ echo "TEST" > .git/description
$ git status
$ git commit --allow-empty -m "Initial commit."
$ git push origin master
However, I noticed that changes to .git/description
don't appear in git status
and does not appear in origin
's local files after push
either..
Is this file expected to be modified on the remote-side only? Is there a way to modify it locally and then upload it to the remote?
Although this question provides a good answer, the post is 12 years old and the solution is a bit tedious (creating symbolic links) regarding the number of repositories I own. Is there anything that could help in newer GIT versions?