<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kennethnnah</title>
    <description>The latest articles on DEV Community by kennethnnah (@techagentng).</description>
    <link>https://dev.to/techagentng</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F379427%2F80d9c96e-3456-4924-a8a9-0d684edf6be1.jpeg</url>
      <title>DEV Community: kennethnnah</title>
      <link>https://dev.to/techagentng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techagentng"/>
    <language>en</language>
    <item>
      <title>Steps to generate github ssh keys for windows</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Sat, 29 Jan 2022 20:55:19 +0000</pubDate>
      <link>https://dev.to/techagentng/steps-to-generate-github-ssh-keys-for-windows-3o3k</link>
      <guid>https://dev.to/techagentng/steps-to-generate-github-ssh-keys-for-windows-3o3k</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--71CKivvi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxbbnkhmozmgyw7yq62v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--71CKivvi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxbbnkhmozmgyw7yq62v.jpg" alt="Image of the error" width="880" height="198"&gt;&lt;/a&gt;Have you wondered why you get this weird error while trying to push or clone code from github? to explain this in few words, it's the new ssh protocol which is githubs way of allowing you easily authenticate to the github service without supplying your username and password everytime you want to push code to the github cloud&lt;/p&gt;

&lt;p&gt;1.&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "your_email@example.com"&lt;/code&gt; copy and paste this code on your command line.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Type &lt;code&gt;cd .ssh&lt;/code&gt; to gain access to that directory. You will find 3 files inside the directory namely; id_rsa, id_rsa.pub and known_hosts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type &lt;code&gt;cat id_rsa.pub&lt;/code&gt; to open and copy the generate key&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once this code has been copied, navigate to settings-&amp;gt;SSH and GPG keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the green button on the top right to create new ssh key, you will be required to fill in a name, then paste and save the generated key. voila!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>ssh</category>
    </item>
    <item>
      <title>Pointers in Golang</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Sun, 29 Aug 2021 09:43:44 +0000</pubDate>
      <link>https://dev.to/techagentng/pointers-in-goland-2n9k</link>
      <guid>https://dev.to/techagentng/pointers-in-goland-2n9k</guid>
      <description>&lt;p&gt;The concept of pointers in golang is one fundamental topic that should be taken very seriously hence the reason for this post. As a beginner, you may have seen the use of ampersand"&amp;amp;" and asteriske"*" symbols which we call pointers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A pointer is a special variable that is used to store data at a particular memory address (Variable Name = Hex Address). The memory address comes in the form of a hexadecimal format(starting with 0x like 0x50c108 etc.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before we get started explaining the meaning of pointers, We shall discuss what variables mean. A variable is the name of a memory location where data is stored, to access the stored data we need to know the location or address where that data is stored. &lt;/p&gt;

&lt;p&gt;Skip this paragraph if you understand the previous. If you dont understand, no worries as I bring home the explanation. 'abia' is a variable name that holds a memory address (0x50c108) which stores data, the memory address is a Hex code which is not easily remembered by humans so we use a named readable convention like "abia" to represent the address in memory where the data "nnamdi" recides. To locate "nnamdi", we have to know the memory address or the variable that holds the value "nnamdi"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we need pointers in our program?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We are going to demostrate this further with an example, in this example we are going to store a hexadecimal number inside variables a and b, the value type is an int. The code snippet below is not a pointer as it is not pointing to a memory location of another variable, it only stores hexadecimal values to a and b as seen below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
// Variables storing the hexadecimal values 

package main

import "fmt"

func main() {

    // storing the hexadecimal
    // values in variables
    a := 0xFF
    b := 0x9C

    // Printing out variable values 
    fmt.Printf("Type of variable a is %T\n", a)
    fmt.Printf("Value of a in hexadecimal is %X\n", a)
    fmt.Printf("Value of a in decimal is %v\n", a)

    fmt.Printf("Type of variable b is %T\n", b)
    fmt.Printf("Value of b in hexadecimal is %X\n", b)
    fmt.Printf("Value of b in decimal is %v\n", b)   

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Type of variable a is int&lt;br&gt;
Value of a in hexadecimal is FF&lt;br&gt;
Value of a in decimal is 255&lt;br&gt;
Type of variable b is int&lt;br&gt;
Value of b in hexadecimal is 9C&lt;br&gt;
Value of b in decimal is 156&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A pointer does not only point to the location or address of another variable but also finds out way to get the value where that variable is located in memory.You may want to ask if the location of a variable is different from the address of that same variable, the answer is No? they are the same, the variable name is just an easy way to represent long hexadecimal addressing scheme.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declaring and Innitializing Pointers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We will look into the 2 important keyword for this blog post which are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operator: This symbol is called the dereferencing operator used to declare a pointer variable and access the value stored in the address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is an example of a pointer declaration which stores the value of the address of another variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example pointer declaration&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; var y string = "String Y"
//Innitialized x with memory address of y
 x := &amp;amp;y
 fmt.Printf("Prints the value of y", *x) // String Y
 fmt.Printf("Prints the address of x", &amp;amp;x) // 0xc000100018
 fmt.Printf("Prints the address of y", x) // 0xc000010230   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>go</category>
      <category>codequality</category>
      <category>variables</category>
      <category>pointers</category>
    </item>
    <item>
      <title>Hello World! to Golang setup on windows</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Sat, 10 Jul 2021 23:17:17 +0000</pubDate>
      <link>https://dev.to/techagentng/how-to-set-up-golang-on-windows-p53</link>
      <guid>https://dev.to/techagentng/how-to-set-up-golang-on-windows-p53</guid>
      <description>&lt;p&gt;&lt;strong&gt;Follow these steps to install and setup your first Go project on windows&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download and install Vscode my preffered editor&lt;/li&gt;
&lt;li&gt;Download and install git bash for windows&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download and install Go executable from this &lt;a href="https://golang.org/doc/install"&gt;link&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up your GO path by typing this on git bash terminal&lt;br&gt;
&lt;br&gt;
&lt;code&gt;export GOPATH=$HOME/go&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will create a "go" folder in your computers C: directory like so: &lt;code&gt;C:/Users/ProfileName/go&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup a new project inside the go folder structure like so:&lt;code&gt;C:/Users/ProfileName/go/src/github.com/githubUserName/projectFolderName&lt;/code&gt;, instead of doing this manually, you can use the windows

&lt;code&gt;mkdir&lt;/code&gt;

command to create your project file path like so: &lt;code&gt;mkdir -p $GOPATH/src/github.com/githubProfileName/projectFolderName&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open up your newly created folder on vscode, install the Go extenstion plugin form vscode plugins to enjoy code highlighting and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create your first Go file with a .go extention then install All on the prompt that pops up after yourFile.go is created.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You are pretty ready to build your first golang project. If this article helped, please kindly hit the buttons so others can get help. Thanks for viewing.&lt;/p&gt;

</description>
      <category>go</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>How to display extra fields  in the profile section of wordpress</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Thu, 28 Jan 2021 11:39:51 +0000</pubDate>
      <link>https://dev.to/techagentng/how-to-display-extra-fields-for-users-in-wordpress-1b69</link>
      <guid>https://dev.to/techagentng/how-to-display-extra-fields-for-users-in-wordpress-1b69</guid>
      <description>&lt;p&gt;Wordpress has several hooks which help developers write custom code that can modify various parts of internal data at runtime. In this short read, I am going to use a hook to add a new column to the worpress profile page. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I generated the extra field code from this useful website &lt;a href="https://www.youtube.com/watch?v=s7ryy2Ee3II&amp;amp;list=LL&amp;amp;index=4&amp;amp;t=1s"&gt;Link&lt;/a&gt;, you can do same or copy the code here.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
/*
Plugin Name: #Extra Plugin
Plugin URI: https://www.sufyan.in/
Description: This plugin code is generated by Sufyan Code Generator.
Version: 1.0.0
Author: Sufyan
Author URI: https://www.sufyan.in/code-generator/
License: GPLv2 or later
Text Domain: sufyan
*/
add_action( 'personal_options_update', 'save_extra_user_profile_fields_eaq' );
add_action( 'edit_user_profile_update', 'save_extra_user_profile_fields_eaq' );

function save_extra_user_profile_fields_eaq( $user_id ) {
    if(!current_user_can( 'edit_user', $user_id ) ) { 
        return false; 
    }
    update_user_meta($user_id, 'trade', $_POST["trade"]);
    update_user_meta($user_id, 'deposit', $_POST["deposit"]);
    update_user_meta($user_id, 'withdraw', $_POST["withdraw"]);
}

add_action( 'show_user_profile', 'extra_user_profile_fields_eaq' );
add_action( 'edit_user_profile', 'extra_user_profile_fields_eaq' );

function extra_user_profile_fields_eaq( $user ) { 
    $user_id = $user-&amp;gt;ID;
    ?&amp;gt;
    &amp;lt;script type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;h3&amp;gt;Extra profile information&amp;lt;/h3&amp;gt;
    &amp;lt;table class="form-table"&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;Trade&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;input type="number" name="trade"autocomplete="off"&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;Deposit&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;input type="number" name="deposit"autocomplete="off"&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;Withdraw&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;input type="number" name="withdraw"autocomplete="off"&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
    &amp;lt;script type="text/javascript"&amp;gt;
        $('input').addClass('regular-text');
        $('input[name=trade]').val('&amp;lt;?php echo get_the_author_meta('trade', $user-&amp;gt;ID); ?&amp;gt;');
        $('input[name=deposit]').val('&amp;lt;?php echo get_the_author_meta('deposit', $user-&amp;gt;ID); ?&amp;gt;');
        $('input[name=withdraw]').val('&amp;lt;?php echo get_the_author_meta('withdraw', $user-&amp;gt;ID); ?&amp;gt;');
        // Hide some default options //
            /*
            $('.user-url-wrap').hide();
            $('.user-description-wrap').hide();
            $('.user-profile-picture').hide();
            $('.user-rich-editing-wrap').hide();
            $('.user-admin-color-wrap').hide();
            $('.user-comment-shortcuts-wrap').hide();
            $('.show-admin-bar').hide();
            $('.user-language-wrap').hide();
            //*/
    &amp;lt;/script&amp;gt;
&amp;lt;?php 
}

function new_modify_user_table_eaq( $column ) {
    $column['trade'] = 'Trade';
    $column['deposit'] = 'Deposit';
    $column['withdraw'] = 'Withdraw';
    return $column;
}
add_filter( 'manage_users_columns', 'new_modify_user_table_eaq' );

function new_modify_user_table_row_eaq( $val, $column_name, $user_id ) {
    $meta = get_user_meta($user_id);
    switch ($column_name) {
        case 'trade' :
            $trade = $meta['trade'][0];
            return $trade;
        case 'deposit' :
            $deposit = $meta['deposit'][0];
            return $deposit;
        case 'withdraw' :
            $withdraw = $meta['withdraw'][0];
            return $withdraw;
        default:
    }
    return $val;
}
add_filter( 'manage_users_custom_column', 'new_modify_user_table_row_eaq', 10, 3 );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function above is a custom plugin generated from  this website &lt;a href="https://www.sufyan.in/code-generator/"&gt;Link&lt;/a&gt;, add the code to the wp plugin folder. it must be activated on the dashboard to work.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add this PHP code on top of the page you want to call the extra field values stored in variables.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$trade = get_user_meta( get_current_user_id(), 'trade', true );
$deposit = get_user_meta( get_current_user_id(), 'deposit', true );
$withdraw = get_user_meta( get_current_user_id(), 'withdraw', true );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Finally call the variables like so on your desired page eg. dashboard when a user is logged in

&lt;code&gt;&amp;lt;?php echo $trade; ?&amp;gt;&lt;/code&gt;

. I will be glad to here your views or questions in the comment section.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Phone memory full fix</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Tue, 05 Jan 2021 07:35:43 +0000</pubDate>
      <link>https://dev.to/techagentng/phone-memory-full-fix-p1d</link>
      <guid>https://dev.to/techagentng/phone-memory-full-fix-p1d</guid>
      <description>&lt;p&gt;I need to hear your views on how this can be solved.&lt;/p&gt;

</description>
      <category>android</category>
      <category>ios</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Implementing styled components with React</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Tue, 15 Dec 2020 17:14:08 +0000</pubDate>
      <link>https://dev.to/techagentng/how-to-use-react-styled-components-5bhl</link>
      <guid>https://dev.to/techagentng/how-to-use-react-styled-components-5bhl</guid>
      <description>&lt;p&gt;Before getting started applying styled components, let me tell you the problem I tried to solve; I wanted to retain the original look and feel of material UI components whilst adding my custom styles to it, for example color and size. Todo this, we need to include material UI’s theme feature which specifies the default style rules of the MUI components, such as color, level of shadow,ripple effect etc…The theme enables us to create a pretty good base for our styling. &lt;br&gt;
Steps to take &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the package by typing this code on terminal:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; * npm install--save styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Import the styled component on top page like so:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; * import styled from 'styled-components'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Declare 'styled.name_of_element in a variable which will be used to wrap the element to be styled. A typical example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const button = styled.newButton``
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Application of this is simple, take the variable that was styled, replace it with the button tags in the render like so:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;&amp;lt;newButton&amp;gt;My Styled button&amp;lt;/newButton&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You can write all your custom styles on a seperate page for proper house keeping, then import that page on your component.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Regular GIT actions of developers in 2021</title>
      <dc:creator>kennethnnah</dc:creator>
      <pubDate>Wed, 09 Dec 2020 04:41:00 +0000</pubDate>
      <link>https://dev.to/techagentng/regular-git-actions-of-developers-in-2021-4ghd</link>
      <guid>https://dev.to/techagentng/regular-git-actions-of-developers-in-2021-4ghd</guid>
      <description>&lt;p&gt;It's often confusing the different commands needed to interact and efficiently work with GIT. We need a handleful of the useful ones. In this short article, I am going to show you the regular unavoidable task performed by modern developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BASIC COMMANDS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a repository on github (Web)&lt;/li&gt;
&lt;li&gt;Delete a mistaken .env from remote: &lt;code&gt;git rm --cached .env&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set up global username &lt;code&gt;git config --global user.name &amp;lt;"ur username"&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set up global email &lt;code&gt;git config --global user.email &amp;lt;"ur password"&amp;gt;&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Add remote url to local &lt;code&gt;git remote add origin &amp;lt;url&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Innitialise a git repository locally &lt;code&gt;git init&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Git clone &lt;code&gt;git clone -b &amp;lt;branch&amp;gt; &amp;lt;remote_repo&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Push code to remote &lt;code&gt;git push origin &amp;lt;branch name&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check remote connection&lt;/li&gt;
&lt;li&gt;Make or create a new branch &lt;code&gt;git checkout -b "master"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Updated local branch with remote changes &lt;code&gt;git pull&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a branch &lt;code&gt;git checkout -b myNewBranch&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pull request &lt;code&gt;git pull &amp;lt;remote&amp;gt; &amp;lt;branch&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Merge between branches&lt;/li&gt;
&lt;li&gt;Check for changes in the tree state &lt;code&gt;git status&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check the repo remote URL &lt;code&gt;git remote -v&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Check remote url &lt;code&gt;git config --get remote.origin.url&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Undo a merge action to its last commit &lt;code&gt;git reset --hard&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Undo git init &lt;code&gt;rm -rf .git&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change git remote origin &lt;code&gt;git remote set-url origin your-git-origin-url-path&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Undo git add . &lt;code&gt;git reset&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;check for latest commit hash: &lt;code&gt;git log --oneline&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Undo latest push: &lt;code&gt;git reverse hash-value&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Delete branch from local &lt;code&gt;git branch -D my-local-branch&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Delete branch from remote &lt;code&gt;git push -d origin &amp;lt;branch-name&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rename local branch &lt;code&gt;git branch -m &amp;lt;old-branch&amp;gt; &amp;lt;new-branch&amp;gt;&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq1uowev9851lfbfjnpqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq1uowev9851lfbfjnpqz.png" alt="git-folder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a repository on github&lt;/strong&gt;&lt;br&gt;
There are two methods to this;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a repo on GitHub website and&lt;/li&gt;
&lt;li&gt;Create a repo locally&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How to create a git repository on GitHub website; To do this, navigate to your newly created GitHub account, follow the prompts, make sure you have confirmed your email address. I created a new account for this demo. The image below is only for new sign-ups with fresh GitHub account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy6z65rl71gw0dahzhqam.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy6z65rl71gw0dahzhqam.JPG" alt="create"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have an already existing account, your screen will look like the image below: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbj62dw4gen0zgxpo33bl.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbj62dw4gen0zgxpo33bl.JPG" alt="old"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking the repo button, you will be prompted to give a name to the repo and optionally add a readme to the new repo folder, ones this done, go ahead and click the create repo green button as the final step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Innitialize a git repo locally&lt;/strong&gt;&lt;br&gt;
Fire up your vsCode, navigate to the command line and type this on the command line &lt;code&gt;git init&lt;/code&gt;. This command innitialises a git repo locally on your pc.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Save your code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Write code on your vsCode, Before saving your code, be sure your remote repo(online) is connected with your local repo. Let us assume we have typed a line of code for the first time and we want to check connection with the remote, type: &lt;code&gt;git remote&lt;/code&gt; if you get a response like &lt;code&gt;fatal: not a git repository (or any of the parent directories): .git&lt;/code&gt;, then it means you are not connected to remote. *connect with the remote: * &lt;code&gt;git remote add origin url&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git clone&lt;/strong&gt; &lt;code&gt;git clone url&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push code to github from local&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can only push code to GitHub from local when you are rightly connected to the remote as illustrated. Follow the steps to push your first code to remote.&lt;br&gt;
&lt;code&gt;git add .&lt;/code&gt;: This command saves your work in the staging area&lt;br&gt;
&lt;code&gt;git commit -m "commit message" This command saves your code to GitHub.&lt;br&gt;
**push code to remote:**&lt;/code&gt;git push origin master`: the origin refers to the remote repo while "master" is the branch we are committing code to.&lt;/p&gt;

&lt;p&gt;*issues from pushing to remote can be solved with this 2 steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;git clone url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Check remote connection:&lt;/strong&gt; &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a branch&lt;/strong&gt; &lt;code&gt;git branch branch-name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check tree/branch status&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you recall that GitHub repository chain is like a tree with branches, you may want to track which brach you are currently working on with this command: &lt;code&gt;git branch&lt;/code&gt;, it shows you your current working branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull request(PR):&lt;/strong&gt; &lt;code&gt;git pull&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you recall, GitHub is a great place for coding teams to collaborate easily. You may have had code commits from other team members on the GitHub repo that has not reflected on your local machine, to check this, you need to type &lt;code&gt;git status&lt;/code&gt;, this will let you know of any changes to the current file, to enable a &lt;code&gt;git pull&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Merge between branches&lt;/strong&gt;&lt;br&gt;
To merge a branch with another, you need to be sure which branch you are currently on. You can use &lt;code&gt;git merge branch&lt;/code&gt; or &lt;code&gt;git rebase branch&lt;/code&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>programming</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
