Jump to content

Update to latest changeset, ignore local changes, via command line


cmlnrowan

Recommended Posts

Need to do something that should be very simple, but not a Plastic expert, so I am struggling with all the lingo.

 

I just want to use the command line to update the repo to the latest changeset of the current branch while ignoring all local changes.

 

The branch is /main

 

In pseudocode I want to:

 

>cm update /myProjectPath branch=/main changeset=latest localChanges=ignore

 

I've tried 

 

>cm update /myProjectPath --last --override

 

Which seems to work sometimes, then not others.

 

Any help would be appreciated.

 

 

 

Link to comment
Share on other sites

Hi!

 

the "--override" will override the changed items you have in your workspace but you need first to change a preference called "Behavior when trying to switch / update the workspace with changed items" (it's inside the Preferences panel -> Other options).

 

The local removed items will be automatically updated.

Same happens for the local moved items, notice that it's handled like a local removed item and you will have the file duplicated since the local moved is not undone, the src file is downloaded again.

 

The "cm unco --all" can undo local and controlled changed, local moved items included.

 

 

So my suggestion is, if you want to undo your local changes and switch to another branch or update you can do as follows:

 

cm unco --all

cm update . / cm stb br/main/whatever

 

BR,

Manu.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...