Frage

I'm new in Git repository. So i have an openshift cloud all configured, and my application allows users to upload their avatar! But when i ran a 'git pull', those uploaded images, never came to my local repository, am i doing something wrong?

>git remote show origin
* remote origin
  Fetch URL: ssh://id@app.rhcloud.com/~/git/app.git/
  Push  URL: ssh://id@app.rhcloud.com/~/git/app.git/
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

>git pull
Already up-to-date.

*UPDATE *

I have this on my local avatar folder:

22/11/2013  16:07    <DIR>          .
22/11/2013  16:07    <DIR>          ..
20/11/2013  14:58         1.232.470 093b9505ea07e2a0a0ba2fbad009761710f11a20.jpg
12/11/2013  10:20            42.438 11d264c7e3360f60a06ae1148b4e7294f686ff8b.png
12/11/2013  10:20            39.569 1cd9ef9d1ef9e86155debb50d06ea9f5d1316441.jpeg
12/11/2013  10:20            65.602 3b731826fe889acd2eb4efa0455ba6fa7b257f20.png
12/11/2013  10:20            42.438 448f8490c02d715691aaf3cb5f9847e70735940b.png
12/11/2013  10:20            27.749 5200215feaa755e86095426c95ccaefa4090c746.png
14/11/2013  11:38            23.681 8e7d5212060b3ada42592f043fcaf15b3d9aa189.png
13/11/2013  15:01            14.715 9a1d6d507cc37f29f7fbc8a9ad0f21c9cc543f22.jpg
12/11/2013  10:20            42.438 9bfa29592bb25945e93c9485bdc42b03efe69c44.png
12/11/2013  10:20             2.473 b9c146bde218eb2c90c55115780173e9a442b143.jpg
12/11/2013  10:20            22.304 c45dbe46fff57dc79aee02494623912bebce74da.jpg
12/11/2013  10:20            23.681 f584b0b5a02605b03ebe49712816e81bd5542fc9.png
12/11/2013  10:20             1.764 sem-imagem.jpg
              13 file(s)      1.581.322 bytes
               2 folder(s)   16.727.244.800 bytes available

I now for test i just uploaded the following image: 7851dc21ab0e1c6d936591c1889f2d259205d4dd.jpg

That doesn't exist in my local repo, but even i running 'git fetch' or 'git pull' i was unable to get that! So if i push some modification, all the avatar folder will be replaced!

War es hilfreich?

Lösung 3

SOLVED!! I have used this similar experience for my issue

https://www.openshift.com/forums/openshift/one-newbie-question

Thanks everybody :)

Andere Tipps

If you are having users upload images via your website, those will not get pushed into your git repository. They will be stored on the disk within your project. You should store them in your $OPENSHIFT_DATA_DIR so that they do not get over-written next time you do a git push also.

Indeed it looks like everything is set up just fine.

Are you sure that those images are in fact stored in the git repository (meaning they are commited)? If they are and the tracking url is correct, then you definitely have them in your system also (tried a ls -la?)

How did you verified that the images are stored in the remote repository?

Edit: Note that a user uploading an avatar to your site does not mean that the image is tracked in the git repository. It exists in the disk of the server, but for it to appear in the git repository it would have to be git added and git commited somehow (which by the way doesn't make much sense).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top