{"id":460,"date":"2015-09-30T08:41:07","date_gmt":"2015-09-30T08:41:07","guid":{"rendered":"http:\/\/coolt.ch\/notizen\/?p=460"},"modified":"2015-10-07T10:50:38","modified_gmt":"2015-10-07T10:50:38","slug":"gitignore-hilfe","status":"publish","type":"post","link":"https:\/\/coolt.ch\/notizen\/gitignore-hilfe\/","title":{"rendered":".gitignore Hilfe"},"content":{"rendered":"<blockquote><p>.gitignore bezieht sich nur auf &lt;untracked files&gt;.\u00a0 Sie sind rot.<br \/>\nNew Files (gr\u00fcn) sind bereits &lt;add&gt; und gitignore sieht sie nicht mehr.<\/p><\/blockquote>\n<p><strong>File aus add-Liste nehmen<br \/>\n<\/strong><\/p>\n<pre class=\"lang:sh decode:true \">git reset HEAD &lt;file&gt;\r\ngit reset HEAD **\/**\/db\/*\r\n<\/pre>\n<p>Die Files werden wieder rot und gelten als ausserhalb des commits.<\/p>\n<p><strong>Test Funktionsweise .gitignore<\/strong><br \/>\nOrdner und Endungen, die in .gitignore stehen, sollten unter den &lt;untracked files&gt; erscheinen.<br \/>\nWichtig: \u00c4nderungen in .gitignore m\u00fcssen zuerst &lt;add&gt; werden, damit sie wirken.<\/p>\n<p><strong>Ordner ignorieren<br \/>\n<\/strong>In gitignore:<span id=\"crayon-560b9fb764488949982753\" class=\"crayon-syntax crayon-syntax-inline crayon-theme-classic crayon-theme-classic-inline crayon-font-monaco\"><span class=\"crayon-pre crayon-code\"><span class=\"crayon-o\"><span class=\"lang:sh decode:true crayon-inline\"> &lt;bla&gt;\/&lt;bli&gt;\/&lt;blo&gt;\/<\/span><br \/>\n<\/span><\/span><\/span>Git kann Ordner nicht ignorieren, nur Dateien. Deshalb ist<strong> \/<\/strong> am Ende <em>zwingend<\/em>.<\/p>\n<p><strong>Ordner relativ ignorieren<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">**\/**\/&lt;blo&gt;\/<\/pre>\n<p><span id=\"crayon-560b9fb764495297139378\" class=\"crayon-syntax crayon-syntax-inline crayon-theme-classic crayon-theme-classic-inline crayon-font-monaco\">Die Anzahl Stufen m\u00fcssen stimmen.<br \/>\n<\/span><strong>Achtung<\/strong>:<br \/>\nBei allgemeinen Namen, k\u00f6nnen <strong>ungewollt andere Ordner betroffen<\/strong> sein. Deshalb lieber zwei Namen angeben, sodass es eindeutig wird.<\/p>\n<p><strong>Etwas aus ignoriertem Ordner hinzuf\u00fcgen<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">Cyclone_IV\/synthese\/db\/<strong>*<\/strong>\r\n! Cyclone_IV\/synthese\/db\/&lt;datei.xxx&gt;<\/pre>\n<p><a class=\"crayon-plain print-no\" href=\"http:\/\/stackoverflow.com\/questions\/5533050\/gitignore-exclude-folder-but-include-specific-subfolder\" data-settings=\"dblclick\">Ordner\/* der Stern ist zwingend<\/a>, damit nicht alles per se ignoriert wird. Nur so k\u00f6nnen unterhalb Dateien wieder zugef\u00fcgt werden.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.gitignore bezieht sich nur auf &lt;untracked files&gt;.\u00a0 Sie sind rot. New Files (gr\u00fcn) sind bereits &lt;add&gt; und gitignore sieht sie nicht mehr. File aus add-Liste nehmen git reset HEAD &lt;file&gt; git reset HEAD **\/**\/db\/* Die Files werden wieder rot und gelten als ausserhalb des commits. Test Funktionsweise .gitignore Ordner und Endungen, die in .gitignore stehen, &hellip; <a href=\"https:\/\/coolt.ch\/notizen\/gitignore-hilfe\/\" class=\"more-link\"><span class=\"screen-reader-text\">.gitignore Hilfe<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[38],"tags":[36,43,44],"_links":{"self":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/460"}],"collection":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":5,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/460\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}