0

I have manage to setup git to push/pull files from local to my development server and vica versa. Now my question is. How can i after i delete a file localy, get that file back ?

When i do "git checkout"

It shows me:

D   helloworld.py 

Or for example I want another Developer to work with me. How can he get the files from my Development server to his local computer ?

An0n
  • 705
  • 6
  • 19
  • 2
    It seems you need to learn and understand git better. Start with [Git for beginners: The definitive practical guide](https://stackoverflow.com/q/315911/7976758). Git doesn't clone/push/pull files, git pushes/pulls trees of commits. – phd Feb 25 '18 at 21:39
  • Im reading and learning at the moment. But I dont want to use Github so i have set it up on my server. But if developer2 now wants to sync with me. What should he do ? From a fresh clean pc, lets say a live version from ubuntu. – An0n Feb 25 '18 at 22:03
  • Please, do not use the same question to ask different things. – Claudio Cortese Feb 25 '18 at 22:15
  • Its the same thing ? Get a file back that i delete ? Get all files from server for new developer ? – An0n Feb 25 '18 at 22:22

1 Answers1

0

To delete a file localy use :

rm -rf <filename>

To delete a file from tracking use :

git rm --cached <filename>

For other developer to get files/repo :

git clone user@server:/path/to/repo $HOME/<reponame>
git status 
An0n
  • 705
  • 6
  • 19