- 1 year ago
Is there a way to remove files from the default changelist in Perforce?
Comment
1 / 1
In Perforce, the default changelist (usually numbered 0) is a special changelist that automatically tracks changes to files that are not explicitly assigned to a numbered changelist. By default, it cannot be deleted or modified directly.
However, you can remove files from the default changelist by assigning them to another numbered changelist. Here's how you can achieve this:
- Open your Perforce client or command-line interface.
- Use the
p4 opened
command to view the files currently open in the default changelist:
This will display a list of files that are currently part of the default changelist.shellp4 opened
- Identify the files you want to remove from the default changelist and note their paths.
- Create a new numbered changelist using the
p4 change
command:
This command will open a text editor with a new changelist specification.shellp4 change -i
- In the changelist specification, provide a description for the new changelist and save the file.
- Assign the files you want to remove from the default changelist to the newly created numbered changelist:
Replaceshellp4 reopen -c <new_changelist> <file_path>
<new_changelist>
with the number of the newly created changelist, and<file_path>
with the path to the file(s) you want to remove from the default changelist. - Verify that the files are no longer part of the default changelist by running the
p4 opened
command again.
By following these steps, you can effectively remove files from the default changelist in Perforce by assigning them to another numbered changelist.