summaryrefslogtreecommitdiff
path: root/doc/bugs/git-annex_sync_does_not_push.mdwn
blob: a5fbc17427d0718be000f68f70886bf328ebf217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
### Please describe the problem.

From the description of `sync` in the man page I assume it should be able to push all the branches it needs:

> The sync process involves first committing all local changes, then fetching and merging the `synced/master` and the `git-annex` branch from the remote repositories, and finally pushing the changes back to those branches on the remote repositories. You can use standard git commands to do each of those steps by hand, or if you don't want to worry about the details, you can use sync.

However this does not seem to be the case if one starts from an empty repository.

### What steps will reproduce the problem?

The following script (from <https://gist.github.com/gioele/d4e0905a3570f097fb0b>) will reproduce this problem:

    #!/bin/sh -x
 
    set -e ; set -u
    export LC_ALL=C
 
    d=$(pwd)

    # cleanup
    chmod a+rwx -R REPO pc1 || true
    rm -Rf REPO pc1

    # create central git repo
    mkdir -p REPO/Docs.git
    cd REPO/Docs.git
    git init --bare
    cd $d

    # populate repo in PC1
    mkdir -p pc1/Docs
    cd pc1/Docs
    echo AAA > fileA
    echo BBB > fileB

    git init
    git remote add origin $d/REPO/Docs.git
    git fetch --all

    git annex init "pc1"
    git annex add .
    git annex sync

    find $d/REPO/Docs.git/refs

    # there should be some branches inside refs

### What version of git-annex are you using? On what operating system?

5.20140412ubuntu1 from Ubuntu 14.04.

> Documentation fixed, so provisionally [[done]] --[[Joey]]