<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nurdan Çalışkan on Medium]]></title>
        <description><![CDATA[Stories by Nurdan Çalışkan on Medium]]></description>
        <link>https://medium.com/@nurdancaliskan?source=rss-2dc7db3052b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZuEz6Nx2H3WNBRKXEdtgMg.jpeg</url>
            <title>Stories by Nurdan Çalışkan on Medium</title>
            <link>https://medium.com/@nurdancaliskan?source=rss-2dc7db3052b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 03:13:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nurdancaliskan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to use SmsManager on Android? (with code example)]]></title>
            <link>https://medium.com/@nurdancaliskan/how-to-use-smsmanager-on-android-with-code-example-e1a34377df7b?source=rss-2dc7db3052b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1a34377df7b</guid>
            <dc:creator><![CDATA[Nurdan Çalışkan]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 12:50:55 GMT</pubDate>
            <atom:updated>2022-07-25T14:15:42.296Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*-o2hxtnjAkmbn3Y5dnMfPw.png" /></figure><p>Hello everyone,<br>Today we will examine how to send an sms using the SmsManager class with a code example.</p><p>With the SmsManager class, it sends text messages, data messages and multimedia messages.</p><p>sendTextMessage(), sendDataMessage(),sendMultimediaMessage()</p><p><strong>First</strong>, we will create a new Android project.</p><p><strong>Second step</strong> go to AndroidManifest.xml. and add permission to send SMS. This permission allows the app to send SMS.</p><pre>&lt;uses-permission android:name=&quot;android.permission.SEND_SMS&quot; /&gt;</pre><p>In the<strong> third step</strong> we will go to the Activity_main.xml file. We will create two EditText for phone number and message and a Button to send sms.</p><pre>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    android:padding=&quot;15sp&quot;<br>    android:gravity=&quot;center&quot;<br>    tools:context=&quot;.MainActivity&quot;<br>    android:orientation=&quot;vertical&quot;&gt;<br><br>    &lt;EditText<br>        android:id=&quot;@+id/editTextPhoneNumber&quot;<br>        android:maxLength=&quot;10&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:inputType=&quot;phone&quot;<br>        android:padding=&quot;15sp&quot;<br>        android:background=&quot;#F9F3F1&quot;<br>        android:hint=&quot;Enter Phone Number&quot; /&gt;<br><br>    &lt;EditText<br>        android:id=&quot;@+id/editTextMessage&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:background=&quot;#F9F3F1&quot;<br>        android:layout_marginTop=&quot;10dp&quot;<br>        android:hint=&quot;Enter Message&quot;<br>        android:inputType=&quot;textMultiLine&quot;<br>        android:lines=&quot;5&quot;<br>        android:padding=&quot;15dp&quot; /&gt;<br><br>    &lt;Button<br>        android:id=&quot;@+id/btnSend&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:layout_marginTop=&quot;10dp&quot;<br>        android:textAllCaps=&quot;false&quot;<br>        android:text=&quot;Send SMS&quot;&gt;<br><br><br>    &lt;/Button&gt;<br><br>&lt;/LinearLayout&gt;</pre><p>In the <strong>fourth step</strong>, we add the necessary codes to send sms in MainActivity.</p><pre>package com.example.smsmanager;<br><br>import androidx.annotation.NonNull;<br>import androidx.appcompat.app.AppCompatActivity;<br>import androidx.core.app.ActivityCompat;<br>import androidx.core.content.ContextCompat;<br><br>import android.Manifest;<br>import android.content.pm.PackageManager;<br>import android.os.Bundle;<br>import android.telephony.SmsManager;<br>import android.view.View;<br>import android.widget.Button;<br>import android.widget.EditText;<br>import android.widget.Toast;<br><br>public class MainActivity extends AppCompatActivity {<br><br>    EditText editTextPhone,editTextMessage;<br>    Button btnSent;<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.<em>activity_main</em>);<br><br>        editTextPhone = findViewById(R.id.<em>editTextPhoneNumber</em>);<br>        editTextMessage = findViewById(R.id.<em>editTextMessage</em>);<br>        btnSent = findViewById(R.id.<em>btnSent</em>);<br><br>        btnSent.setOnClickListener(view -&gt; {<br>            if (ContextCompat.<em>checkSelfPermission</em>(MainActivity.this, Manifest.permission.<em>SEND_SMS</em>) == PackageManager.<em>PERMISSION_GRANTED</em>) {<br>                //when permission is granted<br>                //create a method<br>                sendSMS();<br>            } else {<br>                //when permission is not granted<br>                //request for permission<br>                ActivityCompat.<em>requestPermissions</em>(MainActivity.this, new String[]{Manifest.permission.<em>SEND_SMS</em>}, 100);<br>            }<br>        });<br>    }<br><br>    @Override<br>    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResult) {<br>        super.onRequestPermissionsResult(requestCode, permissions, grantResult);<br>        //check condition<br>        if (requestCode == 100 &amp;&amp; grantResult.length &gt; 0 &amp;&amp; grantResult[0] == PackageManager.<em>PERMISSION_GRANTED</em>){<br>            //permission is granted<br>            //call method<br>            sendSMS();<br>        }else {<br>            //when permission is denied<br>            //display toast message<br>            Toast.<em>makeText</em>(this,&quot;Permission Denied&quot;,Toast.<em>LENGTH_SHORT</em>).show();<br><br>        }<br><br><br>    }<br>    private void sendSMS() {<br>        //get value from edittext<br>        String phone = editTextPhone.getText().toString();<br>        String message = editTextMessage.getText().toString();<br>        <br>        //check condition if string is empty or not<br>        if (!phone.isEmpty() &amp;&amp; !message.isEmpty()) {<br>            //initalize SMS Manager<br>            SmsManager smsManager = SmsManager.<em>getDefault</em>();<br>            //send message<br>            smsManager.sendTextMessage(phone,null,message,null,null);<br>            //display Toast message<br>            Toast.<em>makeText</em>(this,&quot;Sms Sent Successfully &quot;,Toast.<em>LENGTH_SHORT</em>).show();<br>        }else {<br>            Toast.<em>makeText</em>(this,&quot;Please enter phone and message&quot;,Toast.<em>LENGTH_SHORT</em>).show();<br><br>        }<br>    }<br>}</pre><p>And run the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K87q7c3hIcZyvKVHb466Cw.gif" /><figcaption>SmsManager</figcaption></figure><p><strong>Code sample on my Github;</strong></p><p><a href="https://github.com/nurdancaliskan/SmsManager/tree/master">GitHub - nurdancaliskan/SmsManager</a></p><p><strong>Thank you for reading. See you in the next article.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F7DzlajZNY5D0I%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F7DzlajZNY5D0I%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F7DzlajZNY5D0I%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/b92f65138145edba4223a42f329323c9/href">https://medium.com/media/b92f65138145edba4223a42f329323c9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1a34377df7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is ViewPager2 ? How do we use it?]]></title>
            <link>https://medium.com/@nurdancaliskan/how-can-we-use-viewpager2-f70b3ba546c4?source=rss-2dc7db3052b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f70b3ba546c4</guid>
            <dc:creator><![CDATA[Nurdan Çalışkan]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 08:27:05 GMT</pubDate>
            <atom:updated>2022-07-15T08:59:13.170Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*YUyUQnVWOJdowJylg5qB8w.png" /></figure><p>In this article, I want to give you information about ViewPager2 as I used it in my own project. Since I need <strong>binding </strong>in my project, we will also encounter binding in this article.</p><p>First, we need to implement ViewPager2 in the project.</p><pre>implementation &quot;androidx.viewpager2:viewpager2:1.0.0&quot;</pre><p>We also don’t forget to enable ViewBinding.</p><pre>buildFeatures <strong>{<br>    </strong>viewBinding = true<br><strong>}</strong></pre><p>We have to put ViewPager2 inside main_activity.xml</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;&gt;<br><br>    &lt;androidx.viewpager2.widget.ViewPager2<br>        android:id=&quot;@+id/pager&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot; /&gt;<br>&lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;</pre><p>We mentioned that there will be 2 pages in ViewPager and we added the necessary codes.</p><pre>import android.os.Bundle;<br>import androidx.annotation.NonNull;<br>import androidx.appcompat.app.AppCompatActivity;<br>import androidx.fragment.app.Fragment;<br>import androidx.fragment.app.FragmentActivity;<br>import androidx.viewpager2.adapter.FragmentStateAdapter;<br>import androidx.viewpager2.widget.ViewPager2;<br><br>import com.example.viewpager2demo.databinding.ActivityMainBinding;<br><br>public class MainActivity extends AppCompatActivity {<br><br>    private ActivityMainBinding binding;<br><br>    private static final int <em>NUM_PAGES </em>= 2;<br><br>    private ViewPager2 viewPager;<br>    private FragmentStateAdapter pagerAdapter;<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        binding = ActivityMainBinding.<em>inflate</em>(getLayoutInflater());<br>        setContentView(binding.getRoot());<br><br>        pagerAdapter = new PagerAdapter(this);<br>        binding.pager.setAdapter(pagerAdapter);<br>    }<br><br>    private static class PagerAdapter extends FragmentStateAdapter {<br><br>        public PagerAdapter(@NonNull FragmentActivity fragmentActivity) {<br>            super(fragmentActivity);<br>        }<br><br>        @NonNull<br>        @Override<br>        public Fragment createFragment(int position) {<br>            switch (position){<br>                case 0:<br>                    return new FirstFragment();<br>                case 1:<br>                    return new SecondFragment();<br>            }<br>            return new FirstFragment();<br>        }<br><br>        @Override<br>        public int getItemCount() {<br>            return <em>NUM_PAGES</em>;<br>        }<br>    }<br>}</pre><p>Later on, since we will have 2 pages, we need to create 2 fragments.</p><p><strong>First Fragment: (FirstFragment.java)</strong></p><pre>import android.os.Bundle;<br>import androidx.annotation.NonNull;<br>import androidx.appcompat.app.AppCompatActivity;<br>import androidx.fragment.app.Fragment;<br>import androidx.fragment.app.FragmentActivity;<br>import androidx.viewpager2.adapter.FragmentStateAdapter;<br>import androidx.viewpager2.widget.ViewPager2;<br><br>import com.example.viewpager2demo.databinding.ActivityMainBinding;<br><br>public class MainActivity extends AppCompatActivity {<br><br>    private ActivityMainBinding binding;<br><br>    private static final int <em>NUM_PAGES </em>= 2;<br><br>    private ViewPager2 viewPager;<br>    private FragmentStateAdapter pagerAdapter;<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        binding = ActivityMainBinding.<em>inflate</em>(getLayoutInflater());<br>        setContentView(binding.getRoot());<br><br>        pagerAdapter = new PagerAdapter(this);<br>        binding.pager.setAdapter(pagerAdapter);<br>    }<br><br>    private static class PagerAdapter extends FragmentStateAdapter {<br><br>        public PagerAdapter(@NonNull FragmentActivity fragmentActivity) {<br>            super(fragmentActivity);<br>        }<br><br>        @NonNull<br>        @Override<br>        public Fragment createFragment(int position) {<br>            switch (position){<br>                case 0:<br>                    return new FirstFragment();<br>                case 1:<br>                    return new SecondFragment();<br>            }<br>            return new FirstFragment();<br>        }<br><br>        @Override<br>        public int getItemCount() {<br>            return <em>NUM_PAGES</em>;<br>        }<br>    }<br>}</pre><p><strong>Second fragment: (SecondFragment.java)</strong></p><pre>import android.os.Bundle;<br>import androidx.fragment.app.Fragment;<br>import android.view.LayoutInflater;<br>import android.view.View;<br>import android.view.ViewGroup;<br><br>import com.example.viewpager2demo.databinding.FragmentSecondBinding;<br><br>public class SecondFragment extends Fragment {<br><br>    private FragmentSecondBinding binding;<br><br><br>    @Override<br>    public void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br><br>    }<br><br>    @Override<br>    public View onCreateView(LayoutInflater inflater, ViewGroup container,<br>                             Bundle savedInstanceState) {<br>        binding = FragmentSecondBinding.<em>inflate</em>(inflater, container, false);<br>        return binding.getRoot();<br>    }<br><br>    @Override<br>    public void onDestroy() {<br>        super.onDestroy();<br>        binding = null;<br>    }<br>}</pre><p>These fragments also have 2 xml.</p><p><strong>First xml: (fragment_first.xml)</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    tools:context=&quot;.FirstFragment&quot;&gt;<br><br>    &lt;TextView<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:gravity=&quot;center&quot;<br>        android:text=&quot;@string/page1&quot;<br>        android:textSize=&quot;30sp&quot;<br>        android:textColor=&quot;@color/black&quot;/&gt;<br><br>&lt;/FrameLayout&gt;</pre><p><strong>Second xml: (fragment_second.xml)</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    tools:context=&quot;.FirstFragment&quot;&gt;<br><br>    &lt;TextView<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:gravity=&quot;center&quot;<br>        android:text=&quot;@string/page1&quot;<br>        android:textSize=&quot;30sp&quot;<br>        android:textColor=&quot;@color/black&quot;/&gt;<br><br>&lt;/FrameLayout&gt;</pre><p><strong>Code sample on my Github;</strong></p><p><a href="https://github.com/nurdancaliskan/ViewPagerDemo/tree/master">GitHub - nurdancaliskan/ViewPagerDemo</a></p><p><strong>Thank you for reading. See you in the next article.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohhwFL1GEJJHCSwCY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fcbc-funny-comedy-3ohhwFL1GEJJHCSwCY&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F3ohhwFL1GEJJHCSwCY%2Fgiphy-downsized-large.gif%3Fcid%3D790b7611c30cb528d9af60ead908e7d735fdabaf69d9cd13%26rid%3Dgiphy-downsized-large.gif%26ct%3Dg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="297" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c5e3aa4167d93afca04f8bdc2cb1525/href">https://medium.com/media/3c5e3aa4167d93afca04f8bdc2cb1525/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f70b3ba546c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the Android Activity Lifecycle?]]></title>
            <link>https://medium.com/@nurdancaliskan/andorid-activity-lifecycle-ya%C5%9Fam-d%C3%B6ng%C3%BCs%C3%BC-nedir-6ba2e880724f?source=rss-2dc7db3052b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ba2e880724f</guid>
            <dc:creator><![CDATA[Nurdan Çalışkan]]></dc:creator>
            <pubDate>Wed, 22 Jun 2022 14:39:38 GMT</pubDate>
            <atom:updated>2022-06-23T11:22:50.214Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is the Activity?</strong></p><p>Activities are the core component of Android. The first place we encounter when the application is opened is the Activity. In other words, we can say that it is a kind of entry point for Activities.</p><p><strong>What is the Activity Lifecycle?</strong></p><p>The changes in the process from the creation to the destruction of the application are called the Activity Lifecycle.</p><p>From the moment the application starts running, some methods are running in the background during the application’s progress. These methods allow us to hear from the application when the user leaves the application and comes back again. Getting news from the application is also very important for the end-user. When the user starts using the application again after performing other operations on the phone, there should be no loss of performance and operation.</p><figure><img alt="Yaşam Döngüsü" src="https://cdn-images-1.medium.com/max/513/1*25qRAhBtTP8l4hkugcFyjA.png" /></figure><p><strong>What are the Lifecycle Methods and what do they do?</strong></p><p><strong>onCreate()</strong> -&gt; As the name implies it is the state when activity is created.</p><p><strong>onStart()</strong> -&gt; It works after onCreate method. It can run multiple times. This is when the activity first appears.</p><p><strong>onResume() </strong>-&gt; The state in which the application interacts with the user. This status remains operational as long as we do not leave the application.</p><p><strong>onPause() </strong>-&gt; It is the state that works when we pause the execution anywhere while the application is running. This can work when pressing the Back or home keys.</p><p><strong>onStop()</strong> -&gt; This is the case when exiting the application.</p><p><strong>onRestart() </strong>-&gt; It is called when we want the activity to run again after the application is stopped.</p><p><strong>onDestroy()</strong> -&gt; This is the situation we encounter when the application is completely exited. The user is disconnected from the application.</p><pre>public class MainActivity extends AppCompatActivity {<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;likecycle&quot;,&quot;onRestart invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onStart() {<br>        super.onStart();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onStart invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onStop() {<br>        super.onStop();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onStop invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onDestroy() {<br>        super.onDestroy();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onDestroy invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onPause() {<br>        super.onPause();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onPause invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onResume() {<br>        super.onResume();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onResume invoked&quot;);<br>    }<br><br>    @Override<br>    protected void onRestart(){<br>        super.onRestart();<br>        setContentView(R.layout.<em>activity_main</em>);<br>        Log.<em>d</em>(&quot;lifecycle&quot;,&quot;onRestart invoked&quot;);<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2624B2G317h3fsk5EnSz8g.png" /></figure><p><strong>Code sample on my Github;</strong></p><p><a href="https://github.com/nurdancaliskan/ActivityLifecycle">https://github.com/nurdancaliskan/ActivityLifecycle</a></p><p><strong>Thank you for reading. See you in the next article.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*OjE5kO5p_uPLGWmoYD4epQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ba2e880724f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Git and what are Git Commands?]]></title>
            <link>https://medium.com/@nurdancaliskan/what-is-git-and-what-are-git-commands-a522d20e46b7?source=rss-2dc7db3052b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a522d20e46b7</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Nurdan Çalışkan]]></dc:creator>
            <pubDate>Sat, 04 Jun 2022 22:25:04 GMT</pubDate>
            <atom:updated>2022-06-05T10:26:52.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*GzQyMkwhYrLgWirfoBQVEQ.png" /></figure><p><strong>What is Git?</strong></p><ul><li>Git is a version control system (VCS)</li><li>The version control system allows us to keep every change in the project we work on on the internet and in the local (repository) and make changes.<br>It is a system that provides</li><li>As long as you don’t delete the .git file while using Git, you will not lose any code you commit.</li></ul><p><strong>What are the features of Git?</strong></p><ul><li>Git records every step we take in the project we are working on.</li><li>You can return to the previous state of the project you were working on.</li><li>Allows more than one person to work on the same project—ideal for teamwork.</li><li>It helps us display who made the change in a project and at what date and time.</li><li>It helps us to view before and after the code changes we have made.</li><li>Git is flexible and works fast.</li><li>We can use it offline locally.</li></ul><p><strong>What is a Repository? (Repo)</strong></p><ul><li>Storing project files on a remote server.</li></ul><p><strong>What is Stage?</strong></p><ul><li>It is the state where the file is hibernating to commit.</li><li>The stage is where all changes we make wait before committing.</li><li>For example, you are working on an application. You have 2 jobs on you. You did the first job, committed and pushed. While working on the second job, you left the job unfinished. When you return to the project again, the second job will remain only on the computer you are working on.</li></ul><p><strong>What is Commit and what does it do?</strong></p><ul><li>If we make a mistake on the project and we haven’t committed the files, we may have a problem.</li><li>However, if we have committed the files, we can go back to the previous commit and return to the last state of the project before the error.</li><li>It is important to commit these files after making changes on the project and making it a habit makes it easy for us.</li></ul><p><strong>Basic Git Commands</strong></p><p><strong>git init</strong>: If you type -git init- in the git terminal — the directory<br>is converted to a Git repository and it creates a folder named .git <br>(.git comes as a hidden file. You can open it from the folder settings.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*qM0ZT7szKciqgOH5BXUmnQ.png" /><figcaption>git init</figcaption></figure><p><strong>git status</strong>: This shows the status of the files in the current folder and its subfolders. These are the newly added files, which can be modified or unmodified files.</p><p>- Files colored by <strong>red</strong> mean they haven’t been followed by Git yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*QkV5OkL2QyZCvNdSD4AtAw.png" /><figcaption>git status</figcaption></figure><p><strong>git add *</strong>: Used to add a file to the repo.</p><ul><li>Files colored by <strong>green</strong> means they are now followed by git. But they have not been committed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*qQTgp8ZsCdT2tPz-8ONfqw.png" /><figcaption>git add *</figcaption></figure><p><strong>git commit -m “ “:</strong> This command tells git to store the files that have been changed. You can write your commit notes inside the quotes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*TBiba5VwHW1Iyw203T3smw.png" /><figcaption>git commit -m ” ”</figcaption></figure><p><strong>git log</strong>: It shows who committed the change and with which message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*H-LSTkwTUhB5OpQuF2O1Jw.png" /><figcaption>git log</figcaption></figure><p><strong>git config — global user.name:</strong> Used to change our name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*mkqUp6AyYjUIhz1AUzZcSw.png" /><figcaption>git config — global user.name</figcaption></figure><h4><strong>Thank you for reading. See you in the next article.</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1iw6jEWGTlolREXE5S%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1iw6jEWGTlolREXE5S%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F1iw6jEWGTlolREXE5S%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d85db01611f864e7b2899f9679e938d/href">https://medium.com/media/6d85db01611f864e7b2899f9679e938d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a522d20e46b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>