Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6001921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:54:14+00:00 2026-05-23T00:54:14+00:00

Specifically I am wanting to know how to do the ‘delete unversioned/ignored files’ part

  • 0

Specifically I am wanting to know how to do the ‘delete unversioned/ignored files’ part of the command. I want to do this so I can emulate a clean checkout myself, our repository is big and a full checkout takes a fair while.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:54:15+00:00Added an answer on May 23, 2026 at 12:54 am

    Not sure how Jenkins does this, but I’d assume it uses svn status to find unversioned/ignored files.

    Here’s 2 powershell scripts I use to do this:

    #remove_ignored.ps1 (only removes ignored files, leaves unversioned)
    
    param([switch] $WhatIf)
    
    # Find all items with the status of I in svn
    # Strip the leading status code and whitespace
    # Grab the item for said path (either FileInfo or DirectoryInfo)
    $paths = (svn status --no-ignore | Where-Object {$_.StartsWith('I')} | ForEach-Object {$_.SubString(8)} | ForEach-Object {Get-Item -Force $_})
    
    $paths | ForEach-Object {
        if (-not $WhatIf) {
            # Check if the path still exists, in case it was a nested directory or something strange like that
            if ($_.Exists) {
                # If its a directory info, tell it to perform a recursive delete
                if ($_ -is [System.IO.DirectoryInfo]) { $_.Delete($true) }
                else { $_.Delete() }
            }
        }
    
        Write-Host "Deleted $_"
    }
    

    #remove_unversioned.ps1 (removes both ignored and unversioned files)
    param([switch] $WhatIf)
    
    # Find all items with the status of I or ? in svn
    # Strip the leading status code and whitespace
    # Grab the item for said path (either FileInfo or DirectoryInfo)
    $paths = (svn status --no-ignore | Where-Object {$_.StartsWith('I') -or $_.StartsWith('?')} | ForEach-Object {$_.SubString(8)} | ForEach-Object {Get-Item -Force $_})
    
    $paths | ForEach-Object {
        if (-not $WhatIf) {
            # Check if the path still exists, in case it was a nested directory or something strange like that
            if ($_.Exists) {
                # If its a directory info, tell it to perform a recursive delete
                if ($_ -is [System.IO.DirectoryInfo]) { $_.Delete($true) }
                else { $_.Delete() }
            }
        }
    
        Write-Host "Deleted $_"
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Specifically this is regarding when using a client session cookie to identify a session
Specifically I have a PHP command-line script that at a certain point requires input
Specifically, in VS 2008, I want to connect to a data source that you
Specifically, I have a model that has a field like this pub_date = models.DateField(date
I am wanting to know if there is a way, in Oracle SQL, to
Ok, So i know this questions has been asked. and everything i read has
Gang, I apologize if this is a really dumb question... I am wanting to
They can be defined like this Struct.new(:x, :y) But what can usefully be done
I know that some of this data is viewable in iPhoto, such as latitude,
I'm reading binary data from a file, specifically from a zip file. (To know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.