[git-users] git rm

2014-10-13 Thread Tom Avey
I had some files that apache was keeping in /public_html/logs/rewrite_log 
and that was being tracked by git.  Files were too large to push so I 
deleted them and stopped the logging feature (I think it was a log of 
rewrites).  But I am not comfortable enough with git rm to confidently 
remove them from the repository.  Can anyone help?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git rm

2014-10-13 Thread Konstantin Khomoutov
On Mon, 13 Oct 2014 07:03:58 -0700 (PDT)
Tom Avey toma...@fgbc.org wrote:

 I had some files that apache was keeping
 in /public_html/logs/rewrite_log and that was being tracked by git.
 Files were too large to push so I deleted them and stopped the
 logging feature (I think it was a log of rewrites).  But I am not
 comfortable enough with git rm to confidently remove them from the
 repository.  Can anyone help?

It's not really clear what you're asking for here.

You can be quite confident `git rm` removed the files you told it to
(if you committed the change then, of course) -- if it wouldn't it
would be a bug in Git.

On the other hand, `git rm` obviously only removes the files from the
*present* state of the repository, that is, once you recorded a commit
with these files deleted, they are no longer in the present state of
the project but they are not somehow automatically removed from any
*previous* commits they were part of.

Hence if what you want is to completely wipe them off from the *history*
of changes, pretending as if these files weren't there in the first
place, you need another approach completely -- the `git filter-branch`
command of something more simple-minded like [1].

1. http://rtyley.github.io/bfg-repo-cleaner/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git rm dirname didn't work

2014-03-12 Thread Gergely Polonkai
As far as I remember, you have to use git rm -r for that (-r stands for
recursive); but without my machine at home/at work, I'm not 100% sure yet.


On 12 March 2014 04:43, lgp8...@gmail.com wrote:

 I want to rm a directory from the repository. I use git rm dirname, but
 it didn't work. Somebody help me!


 https://lh5.googleusercontent.com/-9_F7r9uVtxk/Ux_XpXwohPI/AAM/4MrA-XMzY4o/s1600/.jpg

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git rm dirname didn't work

2014-03-12 Thread chetna chaudhari
Yes, you can use git rm -r dirname

It works fine. I have used it many times.


On Wed, Mar 12, 2014 at 1:03 PM, Gergely Polonkai gerg...@polonkai.euwrote:

 As far as I remember, you have to use git rm -r for that (-r stands for
 recursive); but without my machine at home/at work, I'm not 100% sure yet.


 On 12 March 2014 04:43, lgp8...@gmail.com wrote:

 I want to rm a directory from the repository. I use git rm dirname, but
 it didn't work. Somebody help me!


 https://lh5.googleusercontent.com/-9_F7r9uVtxk/Ux_XpXwohPI/AAM/4MrA-XMzY4o/s1600/.jpg

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
CHETNA

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git rm dirname didn't work

2014-03-12 Thread Konstantin Khomoutov
On Tue, 11 Mar 2014 20:43:14 -0700 (PDT)
lgp8...@gmail.com wrote:

 I want to rm a directory from the repository. I use git rm dirname,
 but it didn't work. Somebody help me!
 
 https://lh5.googleusercontent.com/-9_F7r9uVtxk/Ux_XpXwohPI/AAM/4MrA-XMzY4o/s1600/.jpg

Do you really see those ? or were they added by you?
I mean, what's the precise error message Git prints? [*]

Next try tracing this command:

  $ GIT_TRACE=1 git rm whatever

and see if it prints more than that.

Also: do you have this directory tracked?

[*] Please do not make screenshots for such trivial cases -- just
copy and paste the text.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git rm dirname didn't work

2014-03-12 Thread Dale R. Worley
 From: lgp8...@gmail.com
 
 I want to rm a directory from the repository. I use git rm dirname, but 
 it didn't work. Somebody help me!

I'm not sure what problem you're seeing, but (according to the man
page) you can't remove a directory with git rm dirname, you have to
do git rm -r dirname.  Basically Git doesn't track directories, it
tracks files, and you have to tell Git to remove all files under that
directory name, and it won't do that without -r.

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] git rm dirname didn't work

2014-03-11 Thread lgp802a
I want to rm a directory from the repository. I use git rm dirname, but 
it didn't work. Somebody help me!

https://lh5.googleusercontent.com/-9_F7r9uVtxk/Ux_XpXwohPI/AAM/4MrA-XMzY4o/s1600/.jpg

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] git rm ./

2013-09-11 Thread superjag
Silly me, I thought this would remove the project directory from the 
staging area, but no, it has to delete the entire project. I was still 
staging my first commit when my project got deleted, so I can't roll back.

I found this:
https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY

But while I can see my files in some kind of command-line editor, I can't 
save them. ESC:w just makes a beeping noise. Any ideas?

I'm running git under Windows.

 - Jonathan Graef

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git rm ./

2013-09-11 Thread Konstantin Khomoutov
On Wed, 11 Sep 2013 11:43:24 -0700 (PDT)
superjag superja...@gmail.com wrote:

 Silly me, I thought this would remove the project directory from the 
 staging area, but no, it has to delete the entire project. I was
 still staging my first commit when my project got deleted, so I can't
 roll back.
 
 I found this:
 https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY
 
 But while I can see my files in some kind of command-line editor, I
 can't save them. ESC:w just makes a beeping noise. Any ideas?
 
 I'm running git under Windows.

Uh... If I can see my files in some kind of command-line editor, I
 can't save them. ESC:w just makes a beeping noise. means
I have run `git show $sha1_name_as_shown_by_git_fsck` and this command
showed me the contents of my file in some kind of command-line editor
then it's just Git spawned the so-called pager which, unless
reconfigured by the user (you) in one way or another defaults to the
program named less [1] which is distributed with Git for Windows.

A pager consumes what another program sends to its standard input
stream (this program is Git in our case) and allows the user to
conveniently (okay, let's not discuss this aspect for a moment) view
this input -- sort of read-only ad-hoc Notepad.

less is ubiquitous in the Unix world but is certainly able to capture
a Windows user by surprise.  To quit less just press the q key (for
*q*uit), and to move the viewport use the page up/page down and cursor
keys.  less is quite versatile -- hit the h key while in it to read its
online help page.

But back to your problem...  The final answer to the thread you
referred to assumed you're familiar with command line, and supposed
that you know about stream redirections supported by it.  Specifically,
if a program prints something to its output, you're able to save this
output by redirecting it to a file, like this:

git show $sha1name  filename

The  filename (also could be spelled without the white space --
filename) is the crucial bit -- it would make `git show` to write
whatever it prints to the file filename.

Git took your by surprise because it tries to be smart and if it
detects it was run on an interactive terminal and the output it's about
to print is larger than the height of this terminal, it spawns the
configured or default pager and sends its output there.  If it detects
its output is redirected by the shell (that  filename thing) it just
prints what it should print, and this output ends up being written into
that file.

See also [2].

1. http://en.wikipedia.org/wiki/Less_%28Unix%29
2. https://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git rm ./

2013-09-11 Thread superjag
Many thanks.

In short, to recover a file deleted by git rm, use git fsck --unreachable to 
show the files git is holding in limbo, and then use git show $sha1name  
filename to save each one back to your filesystem (where $sha1name is the 
blob ID shown in git fsck, and filename is the desired name of the file to 
save it in).

Now I'm off to make that first commit...

 - Jonathan Graef

On Wednesday, September 11, 2013 2:14:19 PM UTC-5, Konstantin Khomoutov 
wrote:

 On Wed, 11 Sep 2013 11:43:24 -0700 (PDT) 
 superjag super...@gmail.com javascript: wrote: 

  Silly me, I thought this would remove the project directory from the 
  staging area, but no, it has to delete the entire project. I was 
  still staging my first commit when my project got deleted, so I can't 
  roll back. 
  
  I found this: 
  https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY 
  
  But while I can see my files in some kind of command-line editor, I 
  can't save them. ESC:w just makes a beeping noise. Any ideas? 
  
  I'm running git under Windows. 

 Uh... If I can see my files in some kind of command-line editor, I 
  can't save them. ESC:w just makes a beeping noise. means 
 I have run `git show $sha1_name_as_shown_by_git_fsck` and this command 
 showed me the contents of my file in some kind of command-line editor 
 then it's just Git spawned the so-called pager which, unless 
 reconfigured by the user (you) in one way or another defaults to the 
 program named less [1] which is distributed with Git for Windows. 

 A pager consumes what another program sends to its standard input 
 stream (this program is Git in our case) and allows the user to 
 conveniently (okay, let's not discuss this aspect for a moment) view 
 this input -- sort of read-only ad-hoc Notepad. 

 less is ubiquitous in the Unix world but is certainly able to capture 
 a Windows user by surprise.  To quit less just press the q key (for 
 *q*uit), and to move the viewport use the page up/page down and cursor 
 keys.  less is quite versatile -- hit the h key while in it to read its 
 online help page. 

 But back to your problem...  The final answer to the thread you 
 referred to assumed you're familiar with command line, and supposed 
 that you know about stream redirections supported by it.  Specifically, 
 if a program prints something to its output, you're able to save this 
 output by redirecting it to a file, like this: 

 git show $sha1name  filename 

 The  filename (also could be spelled without the white space -- 
 filename) is the crucial bit -- it would make `git show` to write 
 whatever it prints to the file filename. 

 Git took your by surprise because it tries to be smart and if it 
 detects it was run on an interactive terminal and the output it's about 
 to print is larger than the height of this terminal, it spawns the 
 configured or default pager and sends its output there.  If it detects 
 its output is redirected by the shell (that  filename thing) it just 
 prints what it should print, and this output ends up being written into 
 that file. 

 See also [2]. 

 1. http://en.wikipedia.org/wiki/Less_%28Unix%29 
 2. https://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ 


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git rm ./

2013-09-11 Thread Jimit Modi
Wow. We Love you GIT :).

--
Jim(y || it)




On Thu, Sep 12, 2013 at 2:18 AM, superjag superja...@gmail.com wrote:

 Many thanks.

 In short, to recover a file deleted by git rm, use git fsck --unreachable to
 show the files git is holding in limbo, and then use git show $sha1name 
 filename to save each one back to your filesystem (where $sha1name is the
 blob ID shown in git fsck, and filename is the desired name of the file to
 save it in).

 Now I'm off to make that first commit...

  - Jonathan Graef

 On Wednesday, September 11, 2013 2:14:19 PM UTC-5, Konstantin Khomoutov
 wrote:

 On Wed, 11 Sep 2013 11:43:24 -0700 (PDT)
 superjag super...@gmail.com wrote:

  Silly me, I thought this would remove the project directory from the
  staging area, but no, it has to delete the entire project. I was
  still staging my first commit when my project got deleted, so I can't
  roll back.
 
  I found this:
  https://groups.google.com/**forum/#!topic/msysgit/**TLmc2996nWYhttps://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY
 
  But while I can see my files in some kind of command-line editor, I
  can't save them. ESC:w just makes a beeping noise. Any ideas?
 
  I'm running git under Windows.

 Uh... If I can see my files in some kind of command-line editor, I
  can't save them. ESC:w just makes a beeping noise. means
 I have run `git show $sha1_name_as_shown_by_git_**fsck` and this
 command
 showed me the contents of my file in some kind of command-line editor
 then it's just Git spawned the so-called pager which, unless
 reconfigured by the user (you) in one way or another defaults to the
 program named less [1] which is distributed with Git for Windows.

 A pager consumes what another program sends to its standard input
 stream (this program is Git in our case) and allows the user to
 conveniently (okay, let's not discuss this aspect for a moment) view
 this input -- sort of read-only ad-hoc Notepad.

 less is ubiquitous in the Unix world but is certainly able to capture
 a Windows user by surprise.  To quit less just press the q key (for
 *q*uit), and to move the viewport use the page up/page down and cursor
 keys.  less is quite versatile -- hit the h key while in it to read its
 online help page.

 But back to your problem...  The final answer to the thread you
 referred to assumed you're familiar with command line, and supposed
 that you know about stream redirections supported by it.  Specifically,
 if a program prints something to its output, you're able to save this
 output by redirecting it to a file, like this:

 git show $sha1name  filename

 The  filename (also could be spelled without the white space --
 filename) is the crucial bit -- it would make `git show` to write
 whatever it prints to the file filename.

 Git took your by surprise because it tries to be smart and if it
 detects it was run on an interactive terminal and the output it's about
 to print is larger than the height of this terminal, it spawns the
 configured or default pager and sends its output there.  If it detects
 its output is redirected by the shell (that  filename thing) it just
 prints what it should print, and this output ends up being written into
 that file.

 See also [2].

 1. 
 http://en.wikipedia.org/wiki/**Less_%28Unix%29http://en.wikipedia.org/wiki/Less_%28Unix%29
 2. 
 https://groups.google.com/d/**msg/git-users/nn3f6FVMSNw/**NryIUTdKvFYJhttps://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.