I have hosting that give me ssh access.
I created bare repository. Where I push before leaving work. But when I pull changes from there it is not working.
nerkn@nerkn-laptop ~/www/project $ git push
Everything up-to-date
config is:
nerkn@nerkn-laptop ~/www/project $ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=ssh://user@domain.com/~/project.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
Then home computer:
nerkn@nerkn-desktop /var/www/project $ git pull
Already up-to-date.
nerkn@nerkn-desktop /var/www/project $ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=ssh://usre@domain.com/~/project.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
gui.wmstate=normal
gui.geometry=962x330+284+384 207 192
If every thing is uptodate and already upto date then why are they different? How I can use this setup. Should I open both of them to sync, without help of my hosting ssh access?
The config that you see when you run
git configis stored locally, per repository, it is not shared between repositories (so it will not be pushed to the server, nor pulled down; it is managed entirely locally). Your config consists of settings for how to manage the repositories, which may need to be different on different machines or even different repos on the same machine, so Git doesn’t manage the contents of the repository configuration nor share it between repos.In order to see files being updated between the two repositories, create or edit a file within one, stage the file using
git add filename, commit usinggit commit, and then push. When you pull from your other repository, you should see the new or updated file.