FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » can't get includes to load
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Git (Was: can't get includes to load) [message #180942 is a reply to message #180941] Thu, 28 March 2013 07:35 Go to previous messageGo to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mysql dynamic binding and pass-by-ref deprecated
Next Topic: Java conferences in India...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 05:24:29 GMT 2024

Total time taken to generate the page: 0.04125 seconds