{"id":149,"date":"2026-02-26T10:44:21","date_gmt":"2026-02-26T10:44:21","guid":{"rendered":"https:\/\/sistemestradingtdr.cat\/?page_id=149"},"modified":"2026-02-27T08:52:06","modified_gmt":"2026-02-27T08:52:06","slug":"github-i-git","status":"publish","type":"page","link":"https:\/\/sistemestradingtdr.cat\/en\/github-i-git\/","title":{"rendered":"Github i Git"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Despr\u00e9s de crear un compte a Github, he creat un repositori p\u00fablic a <a href=\"https:\/\/github.com\/new\">https:\/\/github.com\/new<\/a> amb el nom de TDR-Forex on es pot veure tot el codi del meu projecte:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"474\" src=\"https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10-1024x474.png\" alt=\"\" class=\"wp-image-219\" srcset=\"https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10-1024x474.png 1024w, https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10-300x139.png 300w, https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10-768x356.png 768w, https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10-1536x711.png 1536w, https:\/\/sistemestradingtdr.cat\/wp-content\/uploads\/2026\/02\/image-10.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Figura 7. Repositori a GitHub<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per tal de sincronitzar el repositori de GitHub amb el codi del meu ordinador, i tenir un control de versions, he instal\u00b7lat Git descarregant i executant el fitxer executable de&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/git-scm.com\/downloads\/win\">https:\/\/git-scm.com\/downloads\/win<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ara des del terminal de git sincronitzo el repositori de GitHub amb el meu ordinador:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>git clone <a href=\"https:\/\/github.com\/ErikSH24\/TDR-Forex\">https:\/\/github.com\/ErikSH24\/TDR-Forex<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">i em crea una carpeta buida que es diu TDR-Forex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Una vegada creada executem:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>cd \/d\/Documentos\/Erik\/TDR\/TDR-Forex<br>git init&nbsp; <em>#inicialitzem<\/em><br>git config &#8212;<strong>global<\/strong> user.name \u00abErikSH24\u00bb<br>git config &#8212;<strong>global<\/strong> user.email \u00aberik.sanchon@gmail.com\u00bb<br>git remote add origin &lt;https:\/\/github.com\/ErikSH24\/TDR-Forex&gt;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Aquestes l\u00ednies permeten connectar el meu repositori local (al meu ordinador) amb el de GitHub. Una vegada fet aix\u00f2 ja no les he de tornar a executar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per pujar el codi al repositori de GitHub executem:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>git status&nbsp; <em>#Comprovem l&#8217;estat dels canvis<\/em><br>git add . &nbsp; <em>#Afegim els canvis<\/em><br>git commit -m \u00abEs crea l&#8217;estructura de directoris\u00bb <em>#Fem el commit amb el comentari<\/em><br>git push origin main <em>#Pugem els canvis a github<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Despr\u00e9s de crear un compte a Github, he creat un repositori p\u00fablic a https:\/\/github.com\/new amb el nom de TDR-Forex on es pot veure tot el codi del meu projecte: Figura 7. Repositori a GitHub Per tal de sincronitzar el repositori de GitHub amb el codi del meu ordinador, i tenir un control de versions, he [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-149","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/pages\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":2,"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/pages\/149\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/pages\/149\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/sistemestradingtdr.cat\/en\/wp-json\/wp\/v2\/media?parent=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}