I'm very new to git. And I was doing a git pull from a remote server. First, let me explain my situation.
I have two folders that I've set app
and app.my
. Both of this folders are within myApps
folders.
I use app
to clone
my remote repository and is used for testing and production only. Whereas, the app.my
I want to use pull
for developing the current app. Because I feel that committing would be easier, according to what I understand, that is.
Kindly take note, I use private keys to access my repository, and have added it to my
~/.bash_profile
. So, nothing is wrong there, I'm positive. I think.
In my terminal, I'm inside my app.my
folder. When I use git pull userID@url
,it successfully pulls my files. But instead of pulling all those files into my app.my
folder, it pulls all the files to my myApps
folder. I tried deleting those files LOCALLY, and redo-ing git pull
. Naturally, it says everything is fine. When I enter git status
it showed all my files are DELETED.
So, I tried git reset --hard
All those files were restored, but into the myApps
folder instead of the app.my
folder.
Then I tried moving the files LOCALLY, and again entered git status
to see what happens.
It says my files are deleted. But I understand that there is something wrong with the path that is set.
How do I make the files to be placed in my apps.my
folder instead of the parent folder, myApps
?
Well for me it looks like you have cloned the repository initialy into myApps
some day. Just check out where your .git folder is located.