{"id":90,"date":"2022-01-16T18:35:48","date_gmt":"2022-01-16T18:35:48","guid":{"rendered":"https:\/\/danielpgleason.com\/?p=90"},"modified":"2022-01-16T18:35:48","modified_gmt":"2022-01-16T18:35:48","slug":"perforce-for-git-users","status":"publish","type":"post","link":"https:\/\/danielpgleason.com\/index.php\/2022\/01\/16\/perforce-for-git-users\/","title":{"rendered":"Perforce for Git Users"},"content":{"rendered":"\n<p>This is a quick cheat sheet guide for git users trying to migrate over to perforce.  It does not include an exhaustive list of commands, this is just a simple cheat sheet to get people started.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Command<\/td><td>Git Equivalent <\/td><td>Perforce Documentation<\/td><td>Notes<\/td><\/tr><tr><td>p4 sync<\/td><td>git pull \/ git fetch<\/td><td>https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_sync.html<\/td><td><\/td><\/tr><tr><td>p4 integrate<\/td><td>git merge<\/td><td>https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_integrate.html<\/td><td><\/td><\/tr><tr><td>p4 opened<\/td><td>git status<\/td><td>https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_opened.html<\/td><td>The git status command isn&#8217;t a direct equivalent of p4 opened. However, p4 opened will show what files you have checked out that are not yet submitted. <\/td><\/tr><tr><td>p4 edit<\/td><td>git checkout<\/td><td>https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_edit.html#p4_edit<\/td><td>The git checkout command is usually used for checking out a branch, there is no direct equivalent in git for p4 edit. All files in p4 must be &#8220;checked out&#8221; first before they can be checked in. <\/td><\/tr><tr><td>p4 submit<\/td><td>git push\/git commit<\/td><td>https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_submit.html#p4_submit<\/td><td>In git you usually have to do a git commit command and then a push. In p4, it&#8217;s all in one command, and you submit a &#8220;changelist&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a quick cheat sheet guide for git users trying to migrate over to perforce. It does not include an exhaustive list of commands, this is just a simple cheat sheet to get people started. Command Git Equivalent Perforce Documentation Notes p4 sync git pull \/ git fetch https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_sync.html p4 integrate git merge https:\/\/www.perforce.com\/manuals\/cmdref\/Content\/CmdRef\/p4_integrate.html &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/danielpgleason.com\/index.php\/2022\/01\/16\/perforce-for-git-users\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Perforce for Git Users&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/90"}],"collection":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":1,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/90\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}