<?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: shiva prasad reddy</title>
    <description>The latest articles on DEV Community by shiva prasad reddy (@waystogo).</description>
    <link>https://dev.to/waystogo</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%2F64114%2F6c0f8f74-b22a-49a4-b14a-577d07c15343.png</url>
      <title>DEV Community: shiva prasad reddy</title>
      <link>https://dev.to/waystogo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/waystogo"/>
    <language>en</language>
    <item>
      <title>10 VSCode shortcuts to code faster ✌🏻</title>
      <dc:creator>shiva prasad reddy</dc:creator>
      <pubDate>Thu, 28 Nov 2019 11:52:59 +0000</pubDate>
      <link>https://dev.to/waystogo/10-vscode-shortcuts-to-code-faster-obl</link>
      <guid>https://dev.to/waystogo/10-vscode-shortcuts-to-code-faster-obl</guid>
      <description>&lt;p&gt;1) This is my most favorite and most frequently used shortcut.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-D/ctrl-D 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QHkVIwAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fnt4b42frt4tiyxddpdx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QHkVIwAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fnt4b42frt4tiyxddpdx.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, select the text and then enter command-D to find the instances of similar text.&lt;/p&gt;

&lt;p&gt;2) Let's say we are in the huge file and we want to quickly shift to config or function or type etc this command is most use full&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-shift-O/ctrl-shift-O
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K-GF7VvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rp5wm4iqmau4zdky7zx1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K-GF7VvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rp5wm4iqmau4zdky7zx1.png" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) When we want to quickly jump to a specific line number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;control-G/alt-G
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_qVY_QwN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/agvkrxjb4zwd41j4rmow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_qVY_QwN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/agvkrxjb4zwd41j4rmow.png" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) Searching the text in the entire project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-shift-F/ctrl-shift-F
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;5)Have you tired of copying the block of code and pasting code above or below some code. Then this command is for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;control-up-arrow or control-down-arrow 
alt-up-arrow or alt-down-arrow 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y06Fde9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x2xx372jgxy7vuzcg84l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y06Fde9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x2xx372jgxy7vuzcg84l.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6) Have you ever wondered how to delete a line quickly in vs code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-x/ctrl-x
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MIzmgAWZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/988hfepl6thy8xh9ywkx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MIzmgAWZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/988hfepl6thy8xh9ywkx.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;one more advantage it also copies that line for you.&lt;br&gt;
note: if you want to delete a line without copying then use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-shift-k
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;7) Selecting word , this command is most powerful 🏎 when it is combined with the first example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shift-option-left-arrow/shift-option-right-arrow
shift-alt-left-arrow/shift-alt-right-arrow
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r-zVqvqp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8975igfaopzv62q3ugfu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r-zVqvqp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8975igfaopzv62q3ugfu.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8) Have you ever come across situation where you have declared all constants as lowercase and you have to make them upper case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-shift-P/ctrl-shift-P  -&amp;gt;To open command pallate 
search for Transform to Uppercase

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hHzZWQvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gd7u3uyib0dbnvptgx18.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hHzZWQvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gd7u3uyib0dbnvptgx18.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9) When you are working on different files and you quickly want to get back to the previous file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-P-P/ctrl-P-P
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;10) Search with the file name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌘-P/ctrl-P
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>vscode</category>
      <category>shortcuts</category>
    </item>
    <item>
      <title>Top 5 GIT commands which will save your day   </title>
      <dc:creator>shiva prasad reddy</dc:creator>
      <pubDate>Tue, 19 Nov 2019 15:23:46 +0000</pubDate>
      <link>https://dev.to/waystogo/top-5-git-commands-which-will-save-your-day-13ek</link>
      <guid>https://dev.to/waystogo/top-5-git-commands-which-will-save-your-day-13ek</guid>
      <description>&lt;p&gt;Here is the list of top five git commands which are most useful in my opinion.&lt;/p&gt;

&lt;p&gt;1) Do you want to undo the last commit without losing changes?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD~1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;"~1" is for how many commits you want to undo. let's say we want to undo last 2 commits then we can use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD~2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;which will return us the files changed in the last two commits&lt;/p&gt;

&lt;p&gt;how this can be used with other commands let check that out.&lt;br&gt;
let's say we want to remove the last commit from git history.&lt;br&gt;
then we can simply&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD~1
git push -f 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Note: use -f carefully&lt;/p&gt;

&lt;p&gt;2) Imagine you are working on some tasks and suddenly the manager came to you and asked you to fix some bug.&lt;/p&gt;

&lt;p&gt;this command will help you in saving your changes somewhere safe and you can get back this whenever you wanted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;git stash will temporarily save your changes we can get these changes back by using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash apply
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;3) A case where we don't want to merge conflicts. And we don't want to do any merge using git merge then.&lt;/p&gt;

&lt;p&gt;let's say we are in branch XYZ and we made one commit and when we raise PR we are getting merge conflicts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD~1          -&amp;gt;get's the change of the last commit
git stash                        -&amp;gt;stores them temporally 
git reset --hard origin/develop  -&amp;gt;reset the branch with the develop
                                 -&amp;gt;not current branch files are replaced 
                                   by develop files

git stash apply           -&amp;gt;will get the changes back from the last commit
git commit -m "message"
git push -f                
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The same thing can be achieved by using the merge and rebase but I feel it is more comfortable using this.&lt;/li&gt;
&lt;li&gt;Commit message will be removed in this process so we have to add commit message again &lt;/li&gt;
&lt;li&gt;The same above commands can be used when we want to have a single commit for one task replacement for amend as well. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4) Have you ever came across the situation where you need to add the few more files to the same commit without changing the commit message? Then this command is for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit --amend --no-edit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;git commit will commit the files and --amend will add the additional files to the commit and --no-edit will make sure that we use the same commit message.&lt;br&gt;
note: if we use --amend without --no-edit terminal will prompt an option to edit the commit message &lt;/p&gt;

&lt;p&gt;5) Have you wonder how to reset particular file content with the contents of another branch  &lt;/p&gt;

&lt;p&gt;let's say we are in branch XYZ and we need to update one file contents with develop branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout develop &amp;lt;fileName&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>git</category>
      <category>bitbucket</category>
      <category>terminal</category>
      <category>versioncontrol</category>
    </item>
  </channel>
</rss>
