<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Git &#8211; CodePills.com</title>
	<atom:link href="https://codepills.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>https://codepills.com</link>
	<description>Helping you make a better code</description>
	<lastBuildDate>Sun, 19 Jun 2022 17:12:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>How to set custom configuration for your local Git project repository</title>
		<link>https://codepills.com/how-to-set-custom-configuration-for-your-local-git-project-repository/</link>
					<comments>https://codepills.com/how-to-set-custom-configuration-for-your-local-git-project-repository/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Thu, 01 Jul 2021 09:14:05 +0000</pubDate>
				<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[interactive rebase]]></category>
		<guid isPermaLink="false">https://codepills.com/?p=1243</guid>

					<description><![CDATA[Suppose you do not want to have the same configuration for your local repository as you have your global Git settings. Or you need to fix identity information for commits that are already made in Git commit history. In that case, this article will show you a few Git commands on how to set up the custom configuration for your local Git repository or how to fix past mistakes. <a href="https://codepills.com/how-to-set-custom-configuration-for-your-local-git-project-repository/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Suppose you do not want to have the same configuration for your local repository as you have your global Git settings. Or you need to fix identity information for commits that are already made in Git commit history. In that case, this article will show you a few Git commands on how to set up the custom configuration for your local Git repository or how to fix past mistakes.</p>
<p><span id="more-1243"></span></p>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#change_future_commits_author">Change Future Commits Author</a></li>
<ul>
<li><a href="#git_config_check">Git Config Check</a></li>
<li><a href="#git_global_configuration">Git Global Configuration</a></li>
<li><a href="#git_local_configuration">Git Local Configuration</a></li>
<li><a href="#author_identity_for_the_next_commit">Author Identity For the Next Commit</a></li>
</ul>
<li><a href="#change_past_commits_author">Change Past Commits Author</a></li>
<ul>
<li><a href="#git_ammend_with_author_flag">Git Ammend With Author Flag</a></li>
<li><a href="#git_interactive_rebase">Git Interactive Rebase</a></li>
<li><a href="#git_filter-branch">Git filter-branch Command</a></li>
</ul>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
<h2 id="introduction">Introduction</h2>
<p>There are two different needs in the request of changing author for your commits. Let&#8217;s make clear what are you really looking for:</p>
<ul>
<li>a) Either you want to change the author <b>before</b> making commit.</li>
<li>b) Or you want to change the author <b>after</b> you have made commit.</li>
</ul>
<p>In this article, we will look at both ways how to change the commit&#8217;s author identity.</p>
<h2 id="change_future_commits_author">Change Future Commits Author</h2>
<p>There are three different ways how to change identity for your Git committer. All the procedures only affect future commits and not the past commits made in the development line of your repository (commit history).</p>
<h3 id="git_config_check">Git Config Check</h3>
<p>Just a quick tip. To confirm your settings for global and local configuration you can type command:</p>
<pre><code class="language-bash">git config --list</code></pre>
<p><code>git config --list</code> will show global system git settings. If you run it inside a repository, it will also attach and show you the local configuration.</p>
<p>However, using following command might be more clearer:</p>
<pre><code class="language-bash">git config --list --show-origin</code></pre>
<p><code>git config --list --show-origin</code> command does all what <code>git config --list</code> does. Git command also attaches a path to the origin file of each config item in the list. Arguably, the attached path makes the settings look more understandable, and you can better connect items and their values for local and global Git settings.</p>
<h3 id="git_global_configuration">Git Global Configuration</h3>
<p>If you want to change your username and email by default for all project on your machine, edit global configuration settings. You can run the <code>git config</code> command with <code>--global</code> flag that will override your default Git settings and apply for all the future commits in your repositories. Git command for it looks like this:</p>
<pre><code class="language-bash">git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "EMAIL@example.com"</code></pre>
<h3 id="git_local_configuration">Git Local Configuration</h3>
<p>However, if you want to change your username and email only for single project, go to your repository and make git config adjustment like this:</p>
<pre><code class="language-bash">git config --local user.name "FIRST_NAME LAST_NAME"
git config --local user.email "EMAIL@example.com"</code></pre>
<p>Simply omit the <code>--global</code> flag and replace it with <code>--local</code> flag. <code>git config --local</code> makes the custom configuration valid only in the repository you made a change.</p>
<h3 id="author_identity_for_the_next_commit">Author Identity For the Next Commit</h3>
<p>There is at least one last way how to temporary influence the author identity of the commit. Just right before making the commit, add to <code>commit</code> command <code>--author</code> flag. When making the commit, you can override even local settings.</p>
<pre><code class="language-bash">git commit --author="FIRST_NAME LAST_NAME <EMAIL@example.com>"</code></pre>
<h2 id="change_past_commits_author">Change Past Commits Author</h2>
<p>Changing past commit authors in Git repositories is not so straightforward as it is for future ones. The issue lies in the fundamental idea of Git &#8211; its distributed asynchronous nature. You should be aware of one simple fact that you might cause a massive problem with synchronization if you work on the project with many team members.</p>
<p><strong>When you change Git commit author identity, you create an entirely new commit with a new hash; you are rewriting commit history and development branch.</strong> And while for a single individual repository user, this might not be a problem, for big teams, this might be a cause of enormous evil.</p>
<p>Therefore, let me give you a piece of good advice: if you are working in a team, a change in Git commit history should be adequately communicated with the rest of the team. It might happen that other team members already based their work on the existing commits, and additional changes would cause huge synchronization problems. Communicate with your team if you feel that commits might be already used as the base for other people work. Eventually, for good or bad, it might be possible even to avoid changing commit author identity, and either do rollback commit with new commit with correct author commit or, better, leave the commit history as it is. Commit change is much more critical in the long term as a person who made it (empirical experience &#8211; people come and go from teams, code stays forever).</p>
<h3 id="git_ammend_with_author_flag">Git Ammend With Author Flag</h3>
<p><code>git ammend</code> command is used to patch last commit in Git&#8217;s commit history. By attaching <code>--author</code> flag to <code>git ammend</code> command you can effectively rewrite commit author identity for the last commit in commit history.</p>
<h3 id="git_interactive_rebase">Git Interactive Rebase</h3>
<p><strong>Interactive rebase</strong> is a powerful feature of Git that allows you to edit Git commit history very effectively.</p>
<p>However, <strong>be careful with interactive rebase</strong>, it might shoot you in the foot if you will be not careful! Any changes made will affect your Git commit history. I would recommend to study deeper official Git documentation for <strong>interactive rebase</strong> before making any changes with it over console [<a href="https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages" title="" target="_blank" rel="nofollow noopener">7.6 Git Tools &#8211; Rewriting History</a>]. Otherwise I can really recommend using <strong>interactive rebase</strong> with IDE tools such as <strong>IntelliJ</strong>.</p>
<p>First step, you need to find commit you consider as base for your <strong>interactive rebase</strong>. Provide to git command commit&#8217;s hash like this:</p>
<pre><code class="language-bash">$ git rebase -i -p 9be2477a</code></pre>
<p><code>git rebase</code> command will open the interactive editor in which you need to mark all the commits you want to change. Selected commits will be marked with the red keyword &#8220;edit&#8221;.</p>
<pre><code class="language-bash"><span style="color: red">edit</span> 87bee32a Added new tests
<span style="color: red">edit</span> 1be09dcb Merge branch with hotfix for DJ-1041
<span style="color: red">edit</span> 9be2477a Change title tag for homepage
<span style="color: red">edit</span> c427697c Add images support in gallery</code></pre>
<p>Git will now walk you through each commit. You will have a chance to change every commit individually:</p>
<pre><code class="language-bash">Stopped at 1be09dcb... Merge branch with hotfix for DJ-1041
You can amend the commit now, with

    git commit --amend

Once you are satisfied with your changes, run

    git rebase --continue</code></pre>
<p>Now is your chance to rewrite the commit author identity. Either you will use <code>--amend</code> with <code>--author</code> flag. Or you will continue to next commit in edit mode until you have edited all commits which were marked for edit</p>
<pre><code class="language-bash">$ git commit --amend --author="FIRST_NAME LAST_NAME <EMAIL@example.com>" --no-edit
$ git rebase --continue</code></pre>
<h3 id="git_filter-branch">Git filter-branch</h3>
<p>Last option is to use Git <code>filter-branch</code> command. <code>filter-branch</code> will allow you to go through a large chunk of  commits with the help of simple script. Let us show you a simple script:</p>
<pre><code class="language-bash">$ git filter-branch --env-filter '
OLD_COMMITTER_EMAIL="OLD_EMAIL@example.com"
NEW_COMMITTER_NAME="FIRST_NAME LAST_NAME"
NEW_COMMITTER_EMAIL="NEW_EMAIL@example.com"

if [ "$GIT_COMMITTER_EMAIL" = "$OLD_COMMITTER_EMAIL" ]
then
    export GIT_COMMITTER_NAME="$NEW_COMMITTER_NAME"
    export GIT_COMMITTER_EMAIL="$NEW_COMMITTER_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_COMMITTER_EMAIL" ]
then
    export GIT_AUTHOR_NAME="$NEW_COMMITTER_NAME"
    export GIT_AUTHOR_EMAIL="$NEW_COMMITTER_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags</code></pre>
<p>However, same as with <strong>interactive rebase</strong>, it is necessary to be aware that by using <code>filter-branch</code>, you will create entirely new sort of commits and change Git commit history. The new commit history might have severe consequences when synchronizing with your team, so you should do this preferably only on repositories that haven&#8217;t been published or shared.</p>
<h2 id="conclusion">Conclusion</h2>
<p>In summary, we divided the methods of changing the commit author identity into two different approaches based on the commit stage. We showed three different ways to change the author information before making a commit, and we explained another three ways to change the author information after making a commit.</p>
<p>Did you find commands easy? Do you have your trick or know another way <u>how to change global and local Git settings</u>? Let us know in the comments below the article. We would like to hear your ideas and stories.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/how-to-set-custom-configuration-for-your-local-git-project-repository/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use IntelliJ Idea as a text editor</title>
		<link>https://codepills.com/how-to-use-intellij-idea-as-a-text-editor/</link>
					<comments>https://codepills.com/how-to-use-intellij-idea-as-a-text-editor/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Fri, 01 Jan 2021 15:25:33 +0000</pubDate>
				<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Grammarly]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IntelliJ Idea]]></category>
		<category><![CDATA[IntelliJ Idea IDE]]></category>
		<category><![CDATA[Microsoft Word]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[word processor]]></category>
		<guid isPermaLink="false">https://codepills.com/?p=1104</guid>

					<description><![CDATA[This article will give you a few excellent tips on how and why to turn your favourite IDE into your first choice text editor. <a href="https://codepills.com/how-to-use-intellij-idea-as-a-text-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I have recently started to use IntelliJ Idea as my text editor and integrated it into my creative process.</p>
<p><span id="more-1104"></span></p>
<p>As I am a software developer, IntelliJ IDE is, for me, a must. IDE is in front of me opened all the time. Therefore it is a chance for me to write a lot of content in the IDE.  It is a better choice to use IDE instead of switching to another text editor or using another means of word processing.</p>
<p>Since I am also aiming to work on several articles or documents simultaneously, every decrease in ambiguity and complexity counts towards faster results. The creative process is not possible to automatize. But what it is possible to automatize are redundant tasks during text handling and editing.</p>
<h2>Why turn IntelliJ Idea IDE into your word processor?</h2>
<p>First of all, IntelliJ Idea IDE already comes in its 2020 version with very, very good support for English vocabulary. So writing in English in IDE was never easier than now.</p>
<p>Plus, when implementing the advantage of multiple IntelliJ shortcuts, the word processing is swift. Especially if you write your text in .html, .adoc or .md format.</p>
<p>Overall, IntelliJ IDE comes in all versions with Git support, which is an additional advantage against traditional word processors. You can easily version your articles&#8217; state and keep a history of your edits in one place. Article versioning is a feature that is available only in very advanced mode in cloud SaaS.</p>
<p>However, what I have found very tedious was text formatting in IntelliJ. As expected, I was using IntelliJ Idea IDE for coding, mostly Java, and thus the text was supposed to be wrapped automatically after 120 characters. When I then copied my articles to other word processors in my pipelines, such as Microsoft Word or Grammarly, I always needed painfully deleted every single break line to make a single continuous line of text. That was also one of the most common mistakes I had after publishing articles through WordPress  &#8211; linebreaks were always in places where they should not be.</p>
<p>After enough time spent doing this pointless work, fixing many wrong break lines, I have decided to end it and figure out how to speed up the process. Because every second I spend editing an article is second, I could use it towards another article&#8217;s creative process.</p>
<h2>How to turn IntelliJ Idea into text editor?</h2>
<p>First of all, go to <i>Settings</i> > <i>Editor</i> > <i>General</i> and check all checkboxes in Soft Wraps section.</p>
<p><img fetchpriority="high" decoding="async" src="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_checkboxes_in_general_editor_settings.png" alt="IntelliJ soft-wrap checkboxes_in_general editor settings" width="692" height="361" class="size-full wp-image-1106" srcset="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_checkboxes_in_general_editor_settings.png 692w, https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_checkboxes_in_general_editor_settings-300x157.png 300w" sizes="(max-width: 692px) 100vw, 692px" /></p>
<p>Then go to <i>Settings</i> > <i>Code Style</i> and select Scheme Project. Here unselect the checkbox &#8220;Wrap on typing&#8221;.</p>
<p><img decoding="async" src="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_editor_code_style.png" alt="IntelliJ soft-wrap editor code style" width="807" height="422" class="size-full wp-image-1105" srcset="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_editor_code_style.png 807w, https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_editor_code_style-300x157.png 300w, https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_editor_code_style-768x402.png 768w" sizes="(max-width: 807px) 100vw, 807px" /></p>
<p>I would recommend this change be saved under the current project scheme, not under the IDE scheme. If you are using the same IntelliJ for coding, wrapping will conflict with your code clarity if you save the change under the IDE scheme.</p>
<p>Hit Apply button to apply all the changes.</p>
<h3>Initialize soft-wrap in IntelliJ code editor</h3>
<p>In the active editor tab, on the left side of the text line panel, after the right-click, there is an option <code>soft-wrap</code> to initiate the wrapping. Soft-wrap is not initialized automatically on every new file open. Therefore you will need to initialize soft-wrap on every new file open.</p>
<h3>Tip for shortcut</h3>
<p>When you open a new file, the text is, by default, unwrapped. You can either right-click on the newly opened line meter on the left side and hit <code>Soft-Wrap</code> from the menu option. Or you can set up a special shortcut for soft-wrapping, while the shortcut is not set by default.</p>
<p><img decoding="async" src="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_custom_shortcut.png" alt="IntelliJ soft-wrap - custom shortcut" width="645" height="395" class="size-full wp-image-1107" srcset="https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_custom_shortcut.png 645w, https://codepills.com/wp-content/uploads/2021/01/intellij_soft-wrap_custom_shortcut-300x184.png 300w" sizes="(max-width: 645px) 100vw, 645px" /></p>
<p>To set up your shortcut, go to <i>File</i> > <i>Settings</i> > <i>Keymap</i> and search for &#8220;Soft-Wrap&#8221; in <i>Main Menu</i> > <i>View</i> > <i>Active Editor</i>. Add to action key shortcut. I personally use Alt + P key shortcut. That is not a conflicting key shortcut with keys combinations easy to remember.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/how-to-use-intellij-idea-as-a-text-editor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to connect Azure Cosmos DB Emulator with Spring Boot app at Windows</title>
		<link>https://codepills.com/how-to-connect-azure-cosmos-db-emulator-with-spring-boot-app-at-windows/</link>
					<comments>https://codepills.com/how-to-connect-azure-cosmos-db-emulator-with-spring-boot-app-at-windows/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Fri, 21 Feb 2020 13:58:46 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[CosmosDB]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JDK]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://codepills.com/?p=1060</guid>

					<description><![CDATA[In this article, we look at installing Azure Cosmos DB Emulator on your Windows machine and using the Azure Cosmos DB Emulator for local development of our Spring Boot application. <a href="https://codepills.com/how-to-connect-azure-cosmos-db-emulator-with-spring-boot-app-at-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>This article will look at how to install Azure Cosmos DB Emulator on your Windows machine and how to use the Azure Cosmos DB Emulator for the local development of our Spring Boot application.</p>
<p><span id="more-1060"></span></p>
<h2>How to install Azure CosmosDB Emulator</h2>
<p>First of all, we need to install Azure CosmosDB Emulator locally. Go to <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#installation" title="How to install Cosmos DB" rel="nofollow noopener" target="_blank">https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#installation</a>, download the windows installation package and install <strong>Azure Cosmos DB Emulator</strong>.</p>
<p>When installing Azure Cosmos DB Emulator passed successfully on your Windows machine, start the emulator (if it did not start automatically).</p>
<p>If it is already running you can find it minimized in the system hidden in the running application system and either click <strong>Open Data Explorer &#8230;</strong> or visit <a href="https://localhost:8081/_explorer/index.html" title="local address of Azure Cosmos DB Emulator" rel="nofollow noopener" target="_blank">https://localhost:8081/_explorer/index.html</a> page. You can now get finally into the Azure CosmosDB Emulator.</p>
<h2>Exporting security certificates</h2>
<p>Azure Cosmos DB Emulator uses a secure connection with your application. We need to extract and register your certificate for communication with the emulator.</p>
<p>Let’s type &#8220;Manage user certificates&#8221; into Windows Start console or open Windows Certificate Manager (running certlm.msc in the run prompt). Go to Personal->Certificates folder and export certificate with <strong>DocumentDbEmulatorCertificate</strong> name. The whole tutorial how to do it can be found at <a href="https://docs.microsoft.com/bs-latn-ba/azure/cosmos-db/local-emulator-export-ssl-certificates#how-to-export-the-azure-cosmos-db-ssl-certificate" title="How to export Azure Cosmos DB SSL certificate" rel="nofollow noopener" target="_blank">Microsoft Azure website</a> explaining how to export the Azure Cosmos DB SSL certificate.</p>
<p>You can name your file when exporting arbitrary. However, we will name it for our example <strong>documentdbemulatorcert.cer</strong>.</p>
<p>Now when I have extracted the SSL certificate, I need to upload it into the correct Java SDK location.</p>
<p>Check which version of Java do you use in your project. In IntelliJ idea you can use either keyword shortcut [ctrl] + [shift] + [alt] + [s] or go to File->Project Structure->SDKs and check which version your Spring Boot application uses or where SDK is located.</p>
<p>Copy certificate into the Java SDK directory. It should be copied into the <strong>%JAVA_HOME%/jre/lib/security</strong> location.</p>
<p>If you use OpenJDK, OpenJDK does not contain <strong>jre</strong> folder. Just copy it into <strong>%JAVA_HOME%/lib/security</strong> location.</p>
<h2>Registering certificate</h2>
<p>The nearly last thing we need to do is to register the certificate into the system.</p>
<p>We need to open the Windows Command prompt as an administrator and navigate at JDK&#8217;s folder at jdk\jre\lib\security.</p>
<p><strong>Hint</strong>: A little hint if you are more familiar with Linux based systems than Windows. If you open a folder in Windows, copy the path to the folder and place it into quotation marks in the command prompt. Executing the command changes the directory instantly.</p>
<p>Then, upon the folder, we need just to run the following command to register the certificate into the keystore on your system:</p>
<pre><code class="language-bash">keytool -keystore cacerts -importcert -alias documentdbemulator -file documentdbemulatorcert.cer</code></pre>
<p><strong>Hint</strong>: Keytool is a tool located in your Java installation, so you need to have jdk/bin on your PATH for this to work.</p>
<p>If you need a hint with registration, check this tutorial at <a href="https://docs.microsoft.com/en-us/azure/java/java-sdk-add-certificate-ca-store?view=azure-java-stable#to-add-a-root-certificate-to-the-cacerts-store" title="How to add a root certificate to the cacerts store" rel="nofollow noopener" target="_blank">Microsoft Azure website</a> where you learn how to add a root certificate to the certification authority certificates storage. However instead of <strong>bc2025.cer</strong> name in tutorial use name of your certificate.</p>
<p>Otherwise, when the prompt asks for a password, type your password. More likely you didn&#8217;t change it, so default password is <strong><i>changeit</i></strong>. Following, you get a question, if you trust this certificate. Answer it simply <strong>yes</strong>.</p>
<p>That is it. The certificate is registered, and Azure Cosmos DB Emulator should be now created securely and with ease.</p>
<h2>Using emulator with local Spring Boot app development</h2>
<p>And all we need to do now is just run the Spring Boot application. If you implemented a connection to Cosmos DB and registered connection properties to <code>application.properties</code> or <code>application.yml</code> you can successfully run the application.</p>
<pre><code class="language-yaml">azure:
   cosmosdb:
    uri: https://localhost:8081
    key: VERY_LONG_KEY
    database: YOUR_DB_NAME</code></pre>
<p>To fill up <code>application.yml</code> you will need to implement your own data:</p>
<p>You can find VERY_LONG_KEY in your Azure Cosmos DB Emulator Data Explorer under the <i>Quick start</i> tab.</p>
<p>And all we need to do now is just run the Spring Boot application. If you check now Data Explorer under <i>Explorer</i> tab, you can find now your database with all the defined structures.</p>
<h2>Troubleshooting</h2>
<p>In case you already successfully installed the Azure CosmosDB Emulator and you want to restart the database, you have an option to reset data. Data reset comes handy when you get an authentication issue over HTTPS with your Azure CosmosDB certificate on the application run.</p>
<p>Pick up &#8220;Reset data&#8221; from the Azure CosmosDB Emulator mini-panel dialogue window from your start button. Operation is not reversible; it will clean up all your caches and the internal state of the Azure CosmosDB Emulator database and reset the certificate.</p>
<p>Then it would be best if you continued extracting the certificate from the list of certificates according to the description in Exporting Security Certificates. However, before registering the certificate back to Java keytool, you need to remove the old alias on the certificate with a command like this:</p>
<pre><code class="language-bash">keytool -delete -alias documentdbemulator -keystore cacerts -storepass changeit</code></pre>
<p><strong>Notes</strong>: behind <code>-alias</code> you place the name of the certificate, <code>-keystore</code> is the name of a file containing the certificates and behind <code>-storepass</code> is your password (default is <i>changeit</i>).</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/how-to-connect-azure-cosmos-db-emulator-with-spring-boot-app-at-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use Docker for WordPress development</title>
		<link>https://codepills.com/how-to-use-docker-for-wordpress-development/</link>
					<comments>https://codepills.com/how-to-use-docker-for-wordpress-development/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Mon, 25 Nov 2019 14:12:49 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://codepills.com/?p=1036</guid>

					<description><![CDATA[This is a simple tutorial on how to start using Docker for WordPress development. <a href="https://codepills.com/how-to-use-docker-for-wordpress-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>This article is a simple tutorial on how to start using Docker for WordPress development.</p>
<p><span id="more-1036"></span></p>
<p>In the last couple of months, I had a problem with the XAMPP MySQL database. Without any particular reason, from one day to another, it just failed. XAMPP UI does not show any error.</p>
<p>DB recovery does not help, and it seems that every StackOverflow solution does not work. And digging deeper into the database stack did not bring any working solution.</p>
<p>The only solution which seems to work is to delete the XAMPP entirely and create a fresh new installation. Of course, this is a very tedious and time-consuming solution.</p>
<p>Moreover new MacOS update Catalina just made things worse, and XAMPP MySQL failed instantly. Instead of starting using MAMP, which is just the same way of doing things as XAMPP, I have decided it is the right time to start utilizing the power of Docker for WordPress development.</p>
<h2>Using Docker for WordPress development</h2>
<p>I have decided to create this simple tutorial for WordPress development with Docker for whoever would like to need it. This tutorial is written for macOS/Unix systems based operating systems. However, it is helpful for Windows users as well.</p>
<p>Here is a simple list of steps necessary for starting WordPress development with Docker:</p>
<h2>Step no. 1 &#8211; Install Docker</h2>
<p>Well, of course, the first step is to install Docker itself. I will step over this step while this could be a stand-alone tutorial for that. However, it is super easy, and it can complete even beginner PC user alone.</p>
<h2>Step no. 2 &#8211; Think what do you need for WordPress development</h2>
<p>We will need three containers for WordPress development with Docker. These containers will be:</p>
<ul>
<li>PHP server running WordPress</li>
<li>MySQL or MariaDB database based on your choice</li>
<li>Access to database (over phpMyAdmin GUI)</li>
</ul>
<p>Accessing the database over GUI is optional. Same as selecting the database of your choice. MySQL or MariaDB is up to your preference. So based on what are your needs, you should check the appropriate section in the next step.</p>
<h2>Step no. 2 &#8211; Create docker-compose.yml file</h2>
<p>Create a new directory for a project you want to develop. It will be the location of your choice. This folder should contain single file <code>docker-compose.yml</code>.</p>
<p><b>TIP:</b> There is a nice hack for doing all the steps in one. Just type in your terminal this command <code>mkdir NEW_PROJECT_NAME && cd $_ && touch docker-compose.yml</code> and you will all do this in one line.</p>
<p>Copy code below to <b>docker-compose.yml</b></p>
<pre><code class="language-yml">version: "3.1"

networks:
  wp:

volumes:
  db_storage:

services:

  wordpress:
    container_name: CUSTOM_PROJECT_NAME_wordpress
    image: wordpress
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
    volumes:
        - ./:/var/www/html/wp-content
    ports:
      - 80:80
      - 443:443
    networks:
      - wp
    depends_on:
      - db

  db:
    container_name: CUSTOM_PROJECT_NAME_db
    image: mariadb
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    volumes:
      - db_storage:/var/lib/mysql
    ports:
      - 3306:3306
    networks:
      - wp

  phpmyadmin:
    container_name: CUSTOM_PROJECT_NAME_db_gui
    image: phpmyadmin
    restart: always
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: password
    ports:
      - 8080:80
    networks:
      - wp
    depends_on:
      - db</code></pre>
<p>Let&#8217;s cut down the composer file to pieces and figure out what it does.</p>
<pre><code class="language-yml">version: "3.1"

networks:
  wp:

volumes:
  db_storage:

services:</code></pre>
<table class="table">
<thead>
<tr>
<th scope="col">Line</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">version: &#8220;3.1&#8221;</td>
<td>Version of the Compose file format. Version 3 or higher is the most current and recommended to use.</td>
</tr>
<tr>
<td scope="row">networks: wp:</td>
<td>All networks used for the service. We need to create just one custom network for our containers.</td>
</tr>
<tr>
<td scope="row">volumes: db_storage:</td>
<td>All volumes used for the service. We need to create just one custom volume for our containers.</td>
</tr>
<tr>
<td scope="row">services:</td>
<td>All containers used for this service. We need to create just one custom service.</td>
</tr>
</tbody>
</table>
<pre><code class="language-yml">wordpress:
    container_name: CUSTOM_PROJECT_NAME_wordpress
    image: wordpress
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - ./:/var/www/html/wp-content
    ports:
      - 80:80
      - 443:443
    networks:
      - wp
    depends_on:
      - db</code></pre>
<table class="table">
<thead>
<tr>
<th scope="col">Line</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">container_name</td>
<td>Define the container name in CUSTOM_PROJECT_NAME_wordpress.</td>
</tr>
<tr>
<td scope="row">image: wordpress</td>
<td>If you do not define nothing, latest version of Docker file will be downloaded. To specify custom version of WordPress just add double dot e.g.: wordpress:5.3.0</td>
</tr>
<tr>
<td scope="row">restart: always</td>
<td>Define restart policy &#8211; <a href="//docs.docker.com/compose/compose-file/#restart”" rel="”nofollow” noopener" target="”_blank”">Docker reference</a></td>
</tr>
<tr>
<td scope="row">volumes:<br />
                &#8211; ./:/var/www/html/wp-content</td>
<td>Local folder mapped to container wp-content path. For normal theme or plugin development we do not need to access WordPress core file. <a href="//hub.docker.com/_/wordpress”" rel="”nofollow” noopener" target="”_blank”">Docker WordPress image</a></td>
</tr>
<tr>
<td scope="row">environment:<br />
                WORDPRESS_DB_HOST: db:3306<br />
                WORDPRESS_DB_USER: wordpress<br />
                WORDPRESS_DB_PASSWORD: wordpress<br />
                WORDPRESS_DB_NAME: wordpress</td>
<td>WordPress Docker environment. If you use containers just locally, I would suggest to keep this dummy passwords. Otherwise you are free to change it to your needs. <a href="https://docs.docker.com/compose/compose-file/#environment" target="_blank" rel="nofollow noopener">Docker environment</a></td>
</tr>
<tr>
<td scope="row">ports:<br />
                &#8211; 80:80<br />
                &#8211; 443:443</td>
<td>I/O ports for HTTP and HTTPS</td>
</tr>
<tr>
<td scope="row">networks:<br />
                &#8211; wp</td>
<td>Network to join.</td>
</tr>
<tr>
<td scope="row">depends_on:<br />
                &#8211; db</td>
<td>Dependency declaration.</td>
</tr>
</tbody>
</table>
<p><strong>With just a simple change of DB image from MariaDB to MySQL, you can get different database engine according to your needs. Otherwise, everything is the same for both containers.</strong></p>
<pre><code class="language-yml">db:
    container_name: CUSTOM_PROJECT_NAME_db
    image: mariadb
    # image: mysql
    restart: always
    environment:
        MYSQL_ROOT_PASSWORD: password
        MYSQL_DATABASE: wordpress
        MYSQL_USER: wordpress
        MYSQL_PASSWORD: wordpress
    volumes:
        - db_storage:/var/lib/mysql
    ports:
        - 3306:3306
    networks:
        - wp
</code></pre>
<table class="table">
<thead>
<tr>
<th scope="col">Line</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">container_name</td>
<td>Define the container name in CUSTOM_PROJECT_NAME_wordpress.</td>
</tr>
<tr>
<td scope="row">image: mariadb</td>
<td>If you do not define nothing, latest version of Docker file will be downloaded. <a href="//hub.docker.com/_/mariadb/”" rel="”nofollow” noopener" target="”_blank”">Docker MariaDB image</a><br />If you want to MySQL database instead of MariaDB, type just <code><b>image: mysql</b></code> and latest image of MySQL will be downloaded.</td>
</tr>
<tr>
<td scope="row">restart: always</td>
<td>Define restart policy &#8211; <a href="//docs.docker.com/compose/compose-file/#restart”" rel="”nofollow” noopener" target="”_blank”">Docker reference</a></td>
</tr>
<tr>
<td scope="row">volumes:<br />
                &#8211; db_storage:/var/lib/mysql</td>
<td>Name volume allow data persistence without bothering where the data are stored.</td>
</tr>
<tr>
<td scope="row">environment:<br />
                MYSQL_ROOT_PASSWORD: password<br />
                MYSQL_DATABASE: wordpress<br />
                MYSQL_USER: wordpress<br />
                MYSQL_PASSWORD: wordpress</td>
<td>WordPress Docker environment. If you use containers just locally, I would suggest to keep this dummy passwords. Otherwise you are free to change it to your needs. <a href="https://docs.docker.com/compose/compose-file/#environment" target="_blank" rel="nofollow noopener">Docker environment</a></td>
</tr>
<tr>
<td scope="row">ports:<br />
                &#8211; 3306:3306</td>
<td>Database access ports.</td>
</tr>
<tr>
<td scope="row">networks:<br />
                &#8211; wp</td>
<td>Network to join.</td>
</tr>
</tbody>
</table>
<pre><code class="language-yml">phpmyadmin:
  container_name: CUSTOM_PROJECT_NAME_db_gui
  image: phpmyadmin
  restart: always
  environment:
    PMA_HOST: db
    MYSQL_ROOT_PASSWORD: password
  ports:
    - 8080:80
  networks:
    - wp
  depends_on:
    - db</code></pre>
<table class="table">
<thead>
<tr>
<th scope="col">Line</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">container_name</td>
<td>Define the container name in CUSTOM_PROJECT_NAME_wordpress.</td>
</tr>
<tr>
<td scope="row">image: phpmyadmin/phpmyadmin</td>
<td>If you do not define nothing, latest version of Docker file will be downloaded.</td>
</tr>
<tr>
<td scope="row">restart: always</td>
<td>Define restart policy &#8211; <a href="//docs.docker.com/compose/compose-file/#restart”" rel="”nofollow” noopener" target="”_blank”">Docker reference</a></td>
</tr>
<tr>
<td scope="row">  environment:<br />
                PMA_HOST: db<br />
                MYSQL_ROOT_PASSWORD: password</td>
<td>WordPress Docker environment. If you use containers just locally, I would suggest to keep this dummy passwords. Otherwise you are free to change it to your needs. <a href="https://docs.docker.com/compose/compose-file/#environment" target="_blank" rel="nofollow noopener">Docker environment</a></td>
</tr>
<tr>
<td scope="row">ports:<br />
                &#8211; 8080:80</td>
<td>Connect local 8080 port call to 80 port at Docker service.</td>
</tr>
<tr>
<td scope="row">networks:<br />
                &#8211; wp</td>
<td>Network to join.</td>
</tr>
<tr>
<td scope="row">depends_on:<br />
                &#8211; db</td>
<td>Dependency declaration.</td>
</tr>
</tbody>
</table>
<h2>Step no. 3 &#8211; Run Docker with docker-compose up -d</h2>
<p>From now on all will go quickly. Just type <code>docker-compose up -d</code> and after initial download of all dependencies everything goes smoothly. When all your containers will shine as <code>done</code> you are ready to proceed.</p>
<p>If you run <code>docker ps</code>, you should now see three services with the name you defined in the docker-compose.yml file.</p>
<h2>Step no. 4 &#8211; Install WordPress</h2>
<p>You can find the new WordPress installation at <code>http://localhost:8080/</code> address. Just proceed with the installation as usual and create a new WordPress installation in your local directory. From now on, you can access this WordPress installation as usual.</p>
<p>If you want to access database with phpMyAdmin use <code>http://localhost:8080/index.php</code> address. If you do not change password in yaml file, use name:<code>password</code> and password:<code>password</code> as login information.</p>
<p>So remember, to access:</p>
<ul>
<li><code>http://localhost:80/</code> &#8211; WordPress</li>
<li><code>http://localhost:8080/</code> &#8211; phpMyAdmin (name: password, password: password)</li>
</ul>
<h2>Step no. 5 &#8211; Load your Git theme/plugin repository</h2>
<p>Everything works as if you would be developing any other WordPress project now. If you have your project versioned in Git, go to themes or plugin folder and <code>Git clone</code> your project there. Any change made there will reflect as <code>git diff</code> in Git.</p>
<h2>Step no. 6 &#8211; Shutdown the Docker processes when you finished</h2>
<p>Finally, to proceed and stop Docker container lifecycle, you need to learn a few more commands. They are:</p>
<ul>
<li><code>docker-compose up</code> &#8211; run the processes, however they are attached to life of your terminal window. Docker process will be terminated on the terminal window close up.</li>
<li><code>docker-compose up -d</code> &#8211; leaves the processes running without being attached to your terminal window. Use <code>-d</code> as “detach” for Docker to starts the containers in the background and leaving them running, independently on your terminal window life. <a href="//docs.docker.com/compose/reference/up/”" target="”_blank”" rel="”nofollow” noopener">Docker reference for up</a></li>
<li><code>docker-compose stop</code> &#8211; stop the processes</li>
<li><code>docker-compose down</code> &#8211; stop and removes the processes</li>
<li><code>docker-compose rm -v</code> &#8211; docker cleanup</li>
<li><code>CTRL+C</code> &#8211; killing processes, terminal key shortcut</li>
</ul>
<p>I recommend you kill the Docker processes for your theme every time you think you finished the day. It is advice based on experience from life. If you kill the processes the next day, you can be sure they are not working because they are down, but not because something else went wrong. Plus, if you switch often projects as I do, it is good to keep the system utilization low and order everything.</p>
<h2>Known issues</h2>
<p>While dealing with Docker, some things can go wrong. However, we will not go through all of them here. Let&#8217;s take a look only at the most occurring issues.</p>
<h3>Error establishing a database connection</h3>
<p><img loading="lazy" decoding="async" src="https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection-1024x229.png" alt="Error establishing a database connection - WordPress" width="640" height="143" class="size-large wp-image-1150" srcset="https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection-1024x229.png 1024w, https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection-300x67.png 300w, https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection-768x172.png 768w, https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection-1536x343.png 1536w, https://codepills.com/wp-content/uploads/2019/11/error_establishing_a_database_connection.png 1611w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>If you get an error saying <code>Error establishing a database connection</code> check the name interconnecting database credentials and database name between WordPress and database.</p>
<h2>Conclusion</h2>
<p>I hope you liked this simple tutorial explaining how to quickly and effectively set up Docker for WordPress development. If you have any comments or constructive criticism or have other ideas on enhancing this YML file or tutorial, please write me a comment. I will appreciate it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/how-to-use-docker-for-wordpress-development/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Git &#8211; How to remove folder recursively from Git</title>
		<link>https://codepills.com/git-how-to-remove-folder-recursively-from-git/</link>
					<comments>https://codepills.com/git-how-to-remove-folder-recursively-from-git/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Sat, 01 Jun 2019 17:40:45 +0000</pubDate>
				<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[.gitignore]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[Git]]></category>
		<guid isPermaLink="false">http://codekopf.com/?p=800</guid>

					<description><![CDATA[This article contains several clever commands for removal of unwanted files in your git repository. <a href="https://codepills.com/git-how-to-remove-folder-recursively-from-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>This article contains several clever commands to remove unwanted files in your git repository.</p>
<p><span id="more-800"></span></p>
<h2>Commiting wrong files to repository</h2>
<p>Sometimes, I accidentally start versioning some files or folders that should not be part of the repository. After that, I do not notice the wrong files being versioned, the commit is made, and the content is pushed to the Git repository. I am sure this happens to everybody from time to time.</p>
<h2>How to remove unwanted files and folders from a repository?</h2>
<p>There is only one way, a new fixing commit or patchset is necessary.</p>
<p>Beginner mistake is often to use only <code>git rm DIRECTORY</code> for directory removal. However, this Git command removes not only a directory from the repository but also physically removes it from the local file system.</p>
<p>Adding <code> -r</code> flag to the command, we create a Git command which recursively removes the content of the directory (including the directory folder itself) from the Git repository without the directory and its content being physically removed from the local file system.</p>
<p>Be aware that we must use the <code>--cached</code> flag in the Git command. This correct command formulation removes the content from the Git index.</p>
<p>Here is a command for removing everything from the Git repository within the specific directory:</p>
<p><code>git rm --cached -r DIRECTORY</code></p>
<p>For the single file removal:</p>
<p><code>git rm --cached -r FILE.TXT</code></p>
<p>Quick hack: You can also remove files from the repository based on your .gitignore without deleting them from the local file system :</p>
<p><code>git rm --cached `git ls-files -i -X .gitignore`</code></p>
<p>Alternatively on Windows Powershell:</p>
<p><code>git rm --cached $(git ls-files -i -X .gitignore)</code></p>
<p>So if you have some folders or files that do not belong to the repository, you can now make a fixing commit or patchset with files or folder removal.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/git-how-to-remove-folder-recursively-from-git/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to sync up new Git repository on GitHub or GitLab</title>
		<link>https://codepills.com/how-to-sync-up-new-git-repository-on-github-or-gitlab/</link>
					<comments>https://codepills.com/how-to-sync-up-new-git-repository-on-github-or-gitlab/#respond</comments>
		
		<dc:creator><![CDATA[Andrej Buday]]></dc:creator>
		<pubDate>Sat, 17 Jun 2017 18:56:55 +0000</pubDate>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GitLab]]></category>
		<guid isPermaLink="false">http://codekopf.com/?p=879</guid>

					<description><![CDATA[From time to time you necessary to set up new Git repository. This article is about a list of commands which are helpful for creating a new repository and syncing it with GitHub or GitLab. This article focuses only on users &#8230; <a href="https://codepills.com/how-to-sync-up-new-git-repository-on-github-or-gitlab/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>From time to time you necessary to set up new Git repository. This article is about a list of commands which are helpful for creating a new repository and syncing it with GitHub or GitLab.</p>
<p><span id="more-879"></span></p>
<p>This article focuses only on users with Mac or Linux. For creating new repository or pairing existing with GitHub account or custom GitLab on Windows, please visit official tutorial at <a href="https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/">GitHub website</a>.</p>
<p>&nbsp;</p>
<h5>Setting global git config credentials</h5>
<p>First of all, we need to be sure that we have set global config information. This is one-time configuration.</p>
<pre class="">git config --global user.name "Your Name"
git config --global user.email "your.name@email.com"
</pre>
<h5>Creating the new repository and pushing new it to GitHub or GitLab</h5>
<p>This is the short list of terminal commands for creating a new local repository and syncing the changes with GitHub or GitLab repository.</p>
<pre class="">cd folder
# Change to desired directory 
git init
# Initiate local Git repository
git remote add origin git@github.com:UserName/project.git || git@gitlab.domain.com:UserName/project.git
# Sets the new origin repository
git remote -v
# Verifies the new remote URL
git add .
# Adds all files in the local repository to stage for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
git commit -m "init commit"
# First local commit with message. It commits the tracked changes and prepares them to be pushed to a remote repository. 
# To remove this commit and modify the file, use 'git reset --soft HEAD~1'; and commit and add the file again.
git push -u origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin</pre>
<p>Repository SSH link can be found at GitHub or GitLab project landing page or quick setup page.</p>
<h5>Copy/Clone existing GitHub or GitLab repository to local folder</h5>
<p>This is the short list of terminal commands for cloning existing GitHub or GitLab repository to local repository.</p>
<pre class="">cd folder
# Change to desired directort
git clone git@github.com:UserName/project.git || git@gitlab.domain.com:UserName/project.git
# Clone/Copy all files</pre>
<p>Cloning the repository does not make automatically git repository. For that, we need to repeat the step (above) of initializing local Git repository and setting the origin repository on GitHub or GitLab.</p>
<h5>Security reminder</h5>
<p>Never g<code>it add</code>, <code>commit<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">, </span></code><code>push</code> sensitive information (like passwords, keys, configs, credit card numbers PINs and numbers, etc.) to your remote repository.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codepills.com/how-to-sync-up-new-git-repository-on-github-or-gitlab/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
