I am making changes to some file in my local git repository and then want to send the changes to the remote git repository from which the local was cloned via ssh.
After run "git commit -a" on my local side, to send the changes to the remote, I run
$ git push
Everything up-to-date
However I checked the remote files and they are not changed! Any idea?
Thanks and regards!
Will change the
commit ID
and make the remote repository "think" new changes has been made.I found that the issue was that I had not added the files to the update as well as a message. I fixed this by using the following commands:
and then
and then
Hope this helps someone ;)
None of these solutions worked for me, and the commits would appear on my live website only after running
GIT_WORK_TREE=/path/to/website git checkout -f
. If this is your case you have to add a "hook" to your git configuration.Go to your the hooks folder inside your git folder:
cd ~/path/.git
cd hooks
nano post-receive
Write this line in the post-receive file:
GIT_WORK_TREE=/path/to/your/website/or/project/ git checkout -f
Lastly, you have to modify the permissions of the post-receive file:
chmod a+x post-receive
This will execute that command every time you push, updating your commits on your remote project.
type "git log" in your remote repository to see if it contains the newest commit. If not, you should check the configuration of you local repository to see the remote settings.
To see the changes in different type of your remote repository:
A. If your remote repository is bare, you can find the files in the remote repository branches/ config description HEAD hooks/ info/ objects/ refs/
after new commit is pushed, files in objects/ directory would changed.
B. If your remote repository is non-bare, type "git checkout master" And "git status" in your remote repository to see the file status. See if some file has been modified or deleted.