{"id":100,"date":"2020-08-19T23:33:49","date_gmt":"2020-08-19T14:33:49","guid":{"rendered":"https:\/\/ibndias.wordpress.com\/?p=100"},"modified":"2021-02-15T10:45:15","modified_gmt":"2021-02-15T01:45:15","slug":"git-tutorial-how-to-push-to-a-new-repository","status":"publish","type":"post","link":"https:\/\/blog.derrylab.com\/index.php\/2020\/08\/19\/git-tutorial-how-to-push-to-a-new-repository\/","title":{"rendered":"GIT Tutorial: How to Push to a New Repository"},"content":{"rendered":"\n<p>Set up your global git configuration first.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git config --global user.name \"Your Name\"\ngit config --global user.email \"id@your.site\"<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>If you want to create a new repository:<\/li><\/ul>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-preformatted\">git clone ssh:\/\/id@your.site\/some-repo.git\ncd some-repo\ntouch README.md\ngit add README.md\ngit commit -m \"add README\"\ngit push -u origin master<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Or just push the existing folder into repository:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">cd existing_folder\ngit init\ngit remote add origin ssh:\/\/id@your.site\/some-repo.git\ngit add .\ngit commit -m \"Initial commit\"\ngit push -u origin master<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Or maybe push existing Git repository:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">cd existing_repo\ngit remote rename origin old-origin\ngit remote add origin ssh:\/\/id@your.site\/some-repo.git\ngit push -u origin --all\ngit push -u origin --tags<\/pre>\n\n\n\n<p>That&#8217;s it! It is simple but it helps a lot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set up your global git configuration first. git config &#8211;global user.name &#8220;Your Name&#8221; git config &#8211;global user.email &#8220;id@your.site&#8221; If you want to create a new repository:<\/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,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,5],"tags":[14,23,24,44,53,64],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-linux","category-programming","tag-command","tag-git","tag-gitlab","tag-push","tag-repository","tag-tutorial"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":213,"url":"https:\/\/blog.derrylab.com\/index.php\/2021\/09\/27\/git-pristine-how-to-pristine-clean-your-dirty-git-repository\/","url_meta":{"origin":100,"position":0},"title":"Git Pristine: How to Pristine Clean Your Dirty Git Repository","author":"derry","date":"September 27, 2021","format":false,"excerpt":"I found this command useful and I love this alias! git pristine, a command that will wipe any dirt on your local git copy, any untracked files, and the cache will be removed to make it pristine clean as the remote origin. Now, each time you messed up your repository,\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2538,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/01\/31\/how-to-install-alfa-awus036nh-driver-for-kali-linux\/","url_meta":{"origin":100,"position":1},"title":"How to Install Alfa AWUS036NH Driver for Kali Linux","author":"derry","date":"January 31, 2023","format":false,"excerpt":"This wifi adapter is an important weapon for penetration testers due to its feature that supports monitor and packet injection mode on a 2.4Ghz network. However, even if Alfa said it is already supported out of the box in Kali Linux, I found it unstable out of the box. Sometimes\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/blog.derrylab.com\/index.php\/category\/hardware\/"},"img":{"alt_text":"Computer desktop","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":552,"url":"https:\/\/blog.derrylab.com\/index.php\/2022\/03\/15\/how-to-run-linux-on-riscv-in-arty-a7-100t-fpga\/","url_meta":{"origin":100,"position":2},"title":"How to Run Linux on RISCV in Arty A7-100T FPGA","author":"derry","date":"March 15, 2022","format":false,"excerpt":"It's been tempting for me to try running open-source software on top of open-source hardware. SiFive provides a bitstream for Arty A7 called Freedom, but it seems that the repository is dead now. The other interesting alternative to try is VexRiscv, and everyone keeps posting about Arty A7 35T while\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/pexels-rone-ferreira-3690005-1-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/pexels-rone-ferreira-3690005-1-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/pexels-rone-ferreira-3690005-1-scaled.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/pexels-rone-ferreira-3690005-1-scaled.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/pexels-rone-ferreira-3690005-1-scaled.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":127,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/17\/how-to-fix-raspberry-pi-ssh-hangs-or-not-responding\/","url_meta":{"origin":100,"position":3},"title":"How to Fix Raspberry Pi SSH Hangs or Not Responding","author":"derry","date":"November 17, 2020","format":false,"excerpt":"I just set up a Raspberry PI 4 Model B in the laboratory to automatically connect to the lab's router. I found that each random minutes the SSH is hangs and not responding. Adding IPQoS cs0 cs0 line to the end of \/etc\/ssh\/sshd_config file will fix the issue. :)","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3171,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/12\/18\/how-to-enable-browsing-when-you-have-ssh-access\/","url_meta":{"origin":100,"position":4},"title":"How to Enable Browsing when You Have SSH Access","author":"derry","date":"December 18, 2023","format":false,"excerpt":"Introduction If you have access to SSH into a machine, it means you have full control of that machine. However if not all of the things can be done via terminal SSH, sometimes you need to browse some sites using that machine connection. The simplest solution for this is to\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"view of tunnel","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4163,"url":"https:\/\/blog.derrylab.com\/index.php\/2024\/12\/11\/how-to-fix-broken-json-from-llm-quickly-and-easily\/","url_meta":{"origin":100,"position":5},"title":"How to Fix Broken JSON from LLM Quickly and Easily!","author":"derry","date":"December 11, 2024","format":false,"excerpt":"If you've ever wrestled with broken JSON data from LLMs, you know how frustrating it can be \ud83d\ude2b. Checkout JSON Repair \ud83d\udee0\ufe0f, a Python module by Stefano Baccianella, that\u2019s here to save the day! \ud83c\udf1f This library is specifically crafted to fix invalid JSON, making it perfect for anyone working\u2026","rel":"","context":"In &quot;Artificial Intelligence&quot;","block_context":{"text":"Artificial Intelligence","link":"https:\/\/blog.derrylab.com\/index.php\/category\/artificial-intelligence\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/superai-image-1733846402344.webp?fit=1024%2C1024&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/superai-image-1733846402344.webp?fit=1024%2C1024&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/superai-image-1733846402344.webp?fit=1024%2C1024&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/superai-image-1733846402344.webp?fit=1024%2C1024&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":2,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}