What is the difference between shelve and submit on perforce?

Viewed 280

I am using recently perforce due to the company I am working with is using perforce.

The only SCM I have worked with was Git and only for 3 months (as I am junior) and I know the basic commands.

I find now that P4 has shelve and submit (I just knew push on git) so as far as I understood from the docs, shelve would be the equivalent to git stash and submit the equivalent to push?

1 Answers

The git analogies are not perfect because Perforce is a client-server system and git is a distributed system.

shelve takes your changes and stores them on the server, but they are still in a separate changelist and are not permanent. A shelved change can still be further modified, or even deleted, or it can be made permanent by submitting the shelf.

submit takes your changes and stores them on the server, making them permanent and visible to others; your changes will be received by other users of these files the next time they sync their workspace from the server.

Related