Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8879

Git (Was: can't get includes to load)

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Git (Was: can't get includes to load)
Date 2013-03-28 08:35 +0100
Message-ID <aria5fF4fp0U1@mid.individual.net> (permalink)
References (3 earlier) <oik4l8p0ba3bul14o0ohu58ad1l3opae1d@4ax.com> <arfjc4Fgi12U1@mid.individual.net> <p5qdncIFMa_sIM_MnZ2dnUVZ_ridnZ2d@supernews.com> <arfua1Fit0mU1@mid.individual.net> <MomdnYYAupYbc87MnZ2dnUVZ_oOdnZ2d@supernews.com>

Show all headers | View raw


On 28/03/13 08:17, Cal Dershowitz wrote:
> On 03/27/2013 03:00 AM, J.O. Aho wrote:
>
>> first of all, I would remove all the files ending with ~
>>
>> find /home/sites/migrate -name "*~" -exec rm -f {} \;
>>
>> just copy paste that one, if you feel insure, then make a backup of the
>> directory:
>>
>> cd /home/sites/ && tar -cf ~/migrate.tar migrate && cd && gzip
>> migrate.tar
>>
>> (I know, you can simplify that)
>>
>> Keep in mind, both are "one liners" and just copy past from this post.
>
> Alright, good things, JO, the commands seemed to work just fine.  What's
> more, you wrote these commands at a level where I have the vaguest
> notion of how they work, which is also important.

The first one uses find to find files, in this case the files ending 
with a tilde and then delete those, the {} is the file name and the \; 
is just telling we are at the end of the command we wanted to run on all 
the found files. Keep in mind to always have the "" around the file name 
you are looking for, or bash will expand it and you will get false results.


> $ cd /home/sites && git init && git commit -m "initial commit" -a
> Initialized empty Git repository in /home/sites/.git/
> # On branch master
> #
> # Initial commit
> #
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> #    .jonathan.txt.swp
> #    j2.txt
> #    jonathan.txt
> #    migrate/
> #    www.nmlutherhaven.com/
> #    www.sttimschurch.net/
> nothing added to commit but untracked files present (use "git add" to
> track)

Sorry, the -a option don't work with uncommited files, it to work the 
files has to be in the repository already.

> Now did it take a snapshot all the way up the directory tree?

No, there is nothing in the git repository at the moment.

> The directories there with url-sounding names were the results of wget
> commands.  I don't need them anymore.  How would I go about deleting
> them and them bringing them back to life with git just for practice?

As your commit failed, you need to first add files

git add migrate j2.txt jonathan.txt && git commit -m "initial commit" -a

and now you would have the migrate and the two text files in the repository.

There is two ways to remove something from the repository, method one:

1. Delete/Rename/Move the file you want to remove
2. git rm <file>
3. git commit -m "why you remove it" <file>

or shorter (this will delete the file for you):

1. git rm <file>
2. git commit -m "why you remove it" <file>

<file> = file or directory


Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-25 23:52 -0700
  Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-26 09:36 +0100
    Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-26 14:50 -0700
      Re: can't get  includes to load Jim Higgins <ILikeMy@Privacy.bogus> - 2013-03-27 02:14 +0000
        Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 07:53 +0100
          Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 02:35 -0700
            Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:00 +0100
              Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:03 +0100
              Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:17 -0700
                Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 08:35 +0100
                Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:41 -0700
                Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 09:34 +0100
                Re: Git (Was: can't get  includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-29 00:28 -0700
                Re: Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-29 13:14 +0100
                Re: Git (Was: can't get  includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-31 00:31 -0700
                Re: Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-31 11:54 +0200
        cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 00:00 -0700
          Re: cleaning up first php page was Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 09:06 +0100
            Re: cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:48 -0700
              Re: cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:52 -0700
              Re: cleaning up first php page was Re: can't get  includes to load Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-04 08:57 -0400
        Re: can't get  includes to load Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-27 09:08 +0100

csiph-web