简体   繁体   中英

Git : Where are the source files in my working directory?

在此处输入图片说明

Following the directions in Git : What is my remote url? I have been able to git push a local git repo to a new server where I have initialized a (non-bare) repo at 'gitrepo' (screenshot).

My plan was link gitrepo to the server (its a django project), but I do not see any source files in the working directory. Why not and how can I get then in there?

Pushing to a non-bare repository does not automatically update the working directory files. So, you will need to open a shell window, change to your directory called gitrepo , and run:

git reset --hard master

That will populate the working directory with all the files from the master branch (substitute branch name as needed). You will also have to do this every time you push.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM