1

There is a remote bare repo on a Linux server (repozytorium.git in the following example) and a local non-bare repo. The problem is that after git push dev master no changes take place at the server, even though repozytorium.git/refs/heads/master contains the hash of all commits made locally.

The server contains directories that I want to be tracked by git and those that I don't want tracked. Local repo contains only the former. Is there a way to overwrite directories to be tracked on the server?

The output of the .git/config is:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "dev"]
    url = user@server:/data/repozytorium.git
    fetch = +refs/heads/*:refs/remotes/dev/*
[branch "master"]
    remote = dev
    merge = refs/heads/master 

Just to be clear: output of git remote -v is:

dev     user@server:/data/repozytorium.git (fetch)
dev     user@server:/data/repozytorium.git (push)
balkon16
  • 1,338
  • 4
  • 20
  • 40
  • 1
    A bare repository, by definition, has no work-tree. It has only commits (and other Git internal objects). If, after your `git push`, they have the new commits, they have everything. That's all there is! If you've found a tree of files on the server, those files are not there *because of* the bare repository, they are there because of something else. Find the something else—whatever it is—and adjust it so that it behaves the way you like. – torek Feb 21 '19 at 17:06

0 Answers0