PDA

View Full Version : Git delete from local and remote repositories



Drenriza
June 30th, 2015, 01:45 PM
I have installed git-core on a raspberry pi behind a hardware firewall ment as a git repositori for different projects and files i work on.

My question is, what is the proper way of removing files from the git repositori and than from the disk local and remote.

I have searched on the web but cant find a good example with a explonation on the subject.
I have also looked in the Pro Git (free) pdf book, but didnt quite find what i looked for.

Hoping someone can help me / point me in the right direction.
Thanks on advance.

trent.josephsen
June 30th, 2015, 02:00 PM
$ git rm SOME_FILE
$ git commit
$ git push

Drenriza
June 30th, 2015, 07:20 PM
$ git rm SOME_FILE
$ git commit
$ git push

Hey Trent

Thanks for the reply!

But isint this only for local repo? What about the remote one?

spjackson
June 30th, 2015, 09:28 PM
But isint this only for local repo? What about the remote one?
"git push" sends your local commits to remote, so your "git rm" gets applied there.