threads / discuss / 24792

stgit: command to remove file from patch

Subject: stgit: command to remove file from patch

## tl;dr

2 messages between Aug 19, 2010 and Aug 20, 2010.

replies: 1people: 2as markdown or json

av78us vaal· Aug 19, 2010, 16:29 UTC · lore
Hi, 
Is there a command to remove a file from a patch in stgit? I mean, something like "quilt remove". 
I searched a lot but I couldn't find any. 
If such a command is not available, is there an easy way to achieve this by other means. I tried this by changing the git commit and using "stg repair". That didn't work for me.
I would like to propose "stg remove" to be placed very high on stgit wish-list. 

Thanks, Aneesh

      
Chris Packham· Aug 20, 2010, 00:27 UTC · re: av78us vaal · lore

Re: stgit: command to remove file from patch

On 19/08/10 09:29, av78us vaal wrote:
Show 12 quoted lines
> Hi, 
> 
> Is there a command to remove a file from a patch in stgit? I mean, something like "quilt remove". 
> 
> I searched a lot but I couldn't find any. 
> 
> If such a command is not available, is there an easy way to achieve this by other means. I tried this by changing the git commit and using "stg repair". That didn't work for me.
> 
> I would like to propose "stg remove" to be placed very high on stgit wish-list. 
> 
> Thanks,
> Aneesh
What do you mean by remove?

If you want to undo changes that are in the current patch you can do something like:

  git checkout HEAD~1 filename
  stg refresh
If you want to retain the changes but move them to another patch:
   git reset HEAD filename
   stg refresh -i

I regularly use the first method, the second method I _think_ will work but haven't tried it.

← back to recent threads