Cayce K
Cayce K

Reputation: 2338

Server setup / Remote setup

I am not the one who setup our git system set up so I'm not sure if it was done incorrectly or if we are trying to pull incorrectly.

We have our server setup to have a www2 folder where all of our files are. We have a git install in this folder and it seems to be working fine. A secondary folder was created outside of www2, but on the same level as the folder named www2.git. This folder contains what a normal .git folder would contain.

We have been pushing to www2.git (and all of the working files are on my local machine now). When we go to www2 and run git status I get the expected result of not being able to see any pushes or status stating I'm behind or anything else. When I go to www2.git and run git log I get the expected result and see all the logs of commits that were submitted.

What I don't understand is how am I supposed to merge/pull/fetch/??? these commits into my current working directory. I have attempted to add a git remote and that works, but I can't figure out how to pull from it and creating a branch doesn't seem to work. The most common return I get is xxx is outside of current repository. (Obvious error.)

Am I going about this correctly or do I need to rebuild the project? If I'm going the right direction what am I missing?

Upvotes: 0

Views: 53

Answers (1)

poke
poke

Reputation: 387587

www2 is a local clone of the bare repository www2.git. So someone essentially ran git clone www2.git before to create the www2 folder.

Now, to update that local repository, you use it just like any other local repository. Inside of it, you can run git fetch or git pull to update the working directory which happens to contain the deployed server files.

Upvotes: 2

Related Questions