{"id":11688,"date":"2024-06-01T22:41:00","date_gmt":"2024-06-01T20:41:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=11688"},"modified":"2024-06-01T22:41:01","modified_gmt":"2024-06-01T20:41:01","slug":"never-use-git-pull-youtube","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2024\/06\/01\/never-use-git-pull-youtube\/","title":{"rendered":"Never* use git pull &#8211; YouTube"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"910\" height=\"512\" src=\"https:\/\/www.youtube.com\/embed\/xN1-2p06Urc?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<p>Just a quick summary mostly for myself:<\/p>\n\n\n\n<p>How to use <code class=\"\" data-line=\"\">git pull --rebase<\/code> to keep your team&#8217;s commit history clean. <\/p>\n\n\n\n<p>Command for creating the &#8216;<code class=\"\" data-line=\"\">git pr<\/code>&#8216; alias (so you can copy-paste): <code class=\"\" data-line=\"\">git config --global alias.pr &quot;pull --rebase&quot;<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Always try <code class=\"\" data-line=\"\">git pull --rebase<\/code> first. It if works, you&#8217;re done!<\/li>\n\n\n\n<li>If you get a merge conflix, you can undo everything with <code class=\"\" data-line=\"\">git rebase --abort<\/code><\/li>\n\n\n\n<li>Then just pull &#8220;normally&#8221; using <code class=\"\" data-line=\"\">git pull<\/code>, or do an interactive rebase (advanced)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Just a quick summary mostly for myself: How to use git pull &#8211;rebase to keep your team&#8217;s commit history clean. Command for creating the &#8216;git pr&#8216; alias (so you can copy-paste): git config &#8211;global alias.pr &quot;pull &#8211;rebase&quot;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2024\/06\/01\/never-use-git-pull-youtube\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"video","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[278],"tags":[51],"class_list":["post-11688","post","type-post","status-publish","format-video","hentry","category-tricks","tag-git","post_format-post-format-video"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-32w","jetpack-related-posts":[{"id":1518,"url":"https:\/\/monodes.com\/predaelli\/2016\/05\/11\/master-of-cracking\/","url_meta":{"origin":11688,"position":0},"title":"Master of cracking","author":"Paolo Redaelli","date":"2016-05-11","format":false,"excerpt":"It seems that I'm a master in breaking automated tests. Do you think I can count it as a proficiency? :) Liberty Eiffel automated tests (Bell branch) Last update: 2016-05-11 11:44:02 +0200 (CEST) git pull failed (1) cd \/Liberty && git fetch origin && git checkout bell && git merge\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"liberty-light","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2016\/05\/liberty-light-150x150-1.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":11167,"url":"https:\/\/monodes.com\/predaelli\/2024\/01\/10\/lets-clone-simplemobiletools\/","url_meta":{"origin":11688,"position":1},"title":"Let&#8217;s clone SimpleMobileTools","author":"Paolo Redaelli","date":"2024-01-10","format":false,"excerpt":"Since SimpleMobileTools has been sold by its creator to a company notorious for buying apps from developers and repacking them with ads, putting a \"no-ads\" subscription to remove it for $15 a week, the time is ripe to clone its repositories! Join me, I already did it!: git clone https:\/\/github.com\/SimpleMobileTools\/Simple-App-Launcher\u2026","rel":"","context":"In &quot;Ethics&quot;","block_context":{"text":"Ethics","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/may-the-source-be-with-you-0.webp?fit=750%2C1000&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/may-the-source-be-with-you-0.webp?fit=750%2C1000&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/may-the-source-be-with-you-0.webp?fit=750%2C1000&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/may-the-source-be-with-you-0.webp?fit=750%2C1000&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":10940,"url":"https:\/\/monodes.com\/predaelli\/2023\/11\/03\/versioning-data-in-postgres-testing-a-git-like-approach-specfy\/","url_meta":{"origin":11688,"position":2},"title":"Versioning data in Postgres? Testing a git like approach &#8211; Specfy","author":"Paolo Redaelli","date":"2023-11-03","format":false,"excerpt":"Versioning data in Postgres? Testing a git like approach - Specfy is fashinating but I think that most of the time these two proposed alternatives fit most of the needs: In-Table versioning, the Wordpress way of doing thing. Add a a column version (or modify date) and SELECT the maximum\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":915,"url":"https:\/\/monodes.com\/predaelli\/2016\/01\/21\/find-and-restore-a-deleted-file-in-a-git-repository\/","url_meta":{"origin":11688,"position":3},"title":"Find and restore a deleted file in a Git repository","author":"Paolo Redaelli","date":"2016-01-21","format":false,"excerpt":"Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted;Use git checkout $commit~1 filename to restore the deleted file. Sorgente: Find and restore a deleted file in a Git repository - Stack Overflow","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11886,"url":"https:\/\/monodes.com\/predaelli\/2024\/09\/01\/git-copy-a-file-or-directory-from-another-repository-preserving-the-history\/","url_meta":{"origin":11688,"position":4},"title":"Git: Copy a file or directory from another repository preserving the history","author":"Paolo Redaelli","date":"2024-09-01","format":"quote","excerpt":"How to copy a file or directory from another GIT repository while preserving its history? Internet is full of magic formulas each one more complex. Here I\u2019m proposing a much simpler and faster one that is to make a git format-patch for the entire history of the file or subdirectory\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2449,"url":"https:\/\/monodes.com\/predaelli\/2017\/05\/11\/versionpress-git-for-wordpress-sites\/","url_meta":{"origin":11688,"position":5},"title":"VersionPress \u2013 Git for WordPress sites","author":"Paolo Redaelli","date":"2017-05-11","format":"link","excerpt":"VersionPress WordPress + Git = \u2661","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=11688"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11688\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=11688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=11688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=11688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}