Results 1 to 4 of 4

Thread: Git delete from local and remote repositories

  1. #1
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Git delete from local and remote repositories

    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.

  2. #2
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Git delete from local and remote repositories

    Code:
    $ git rm SOME_FILE
    $ git commit
    $ git push
    Last edited by trent.josephsen; June 30th, 2015 at 02:06 PM. Reason: forgot to push!

  3. #3
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Git delete from local and remote repositories

    Quote Originally Posted by trent.josephsen View Post
    Code:
    $ 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?

  4. #4
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Git delete from local and remote repositories

    Quote Originally Posted by Drenriza View Post
    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.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •