Ankit Raj Goyal

howto · 2024-02-15

How to Restore Deleted Files Before Commit in Git

This article uses the reset and checkout commands with various options to restore deleted files uncommitted in Git. Learn a neat trick to batch undelete many files with a single command.

howto · 2024-02-15

How to Check if Checkbox Is Checked With jQuery

Learn all the cool methods to jQuery check if checkbox is checked in this tutorial. We show different approaches using direct DOM operations, jQuery methods to extract JavaScript properties, and using jQuery selectors. You will also find lots of useful short-cuts and ready-made scripts for common use cases.

howto · 2024-02-02

How to Undo Pushed Commits in Git With Reset and Revert

We show three methods to undo commits pushed into a remote repository with the use of the reset, revert, and checkout git commands.

howto · 2024-02-02

How to Show Changes in Git Commit

You can show commit changes in Git with this tutorial's help. We use the Git diff, and many other Git commands. You will also find helpful shortcuts and options to quickly show the specific changes you want.

howto · 2024-02-02

How to Delete All Local Branches in Git

This tutorial shows how to delete all local branches with the help of scripting in Git. We provide helpful options for different use cases. We also show a one-line hard delete solution at the end of the tutorial.

howto · 2024-02-02

How to Clone a Repo or a Branch With SSH Key in Git

You can Git clone using SSH key with this tutorial - setup SSH in Git, update SSH public key in GitHub, and use options - clone only a specific branch, into a chosen location, or only recent commits.

howto · 2024-02-02

How to Show Commit History for One Branch Using Git Log With Range

This tutorial shows methods to view Git commit history for branch by using Git log with range. We demonstrate several ways to set limiting options in the Git log command for different situations. You will also find useful shortcuts to help you write less code to get your required subset of commits history.

howto · 2024-02-02

How to Git Push to Another Branch With a Different Name

This article teaches an option to Git push to specific branch with a name of your choice. You can learn to do so by following along with this tutorial. We use the Git push command but pass some exciting options to it. We also take a peak into Git refspecs that are key to achieve this functionality.

howto · 2024-02-02

How to Copy Remote Branch to Local Branch in Git

We copy the contents of a remote branch to a local branch using three methods. The latest way is to use the git switch command with the copy option, but we also show the old git checkout method and the git branch command with the copy flag.

howto · 2024-02-02

How to Undo Git Stash Pop Conflicts

We show two ways to undo git stash pop with merge conflicts. You may either choose to only clean up the bad merges to undo failed stash pop using two commands. Else, you could locally edit or pull the correct changes in your files to resolve and merge with good commits.

howto · 2024-02-02

How to Scroll to the Top of a Page in JavaScript

We show several methods to scroll to the top of the page using JavaScript in this blog post. We use both vanilla JavaScript and jQuery. You will also see a clever plain HTML hack to scroll to the top JavaScript and a small script to design a custom JavaScript scroll to the top animation from scratch.

howto · 2024-02-02

How to Disable Button in jQuery

We use the onclick event handler and pass the event object, the this keyword, and the element id to disable button in jQuery. You will also see the use of the HTML disabled attribute and the disabled DOM property.

howto · 2024-02-02

How to Get Selected Option From Dropdown in jQuery

In this article, we'll discuss different methods to jQuery get selected option from dropdowns. We cover multiple-option select elements and grouped option select elements.

howto · 2024-02-02

How to Scroll to Element in jQuery

We use scrollTop() and offset() functions to scroll to element in this post. We show different ways and useful options for every use case. Also, we provide two shortcuts and few tips you need to take care of. You will also learn to animate scroll in jQuery.

howto · 2022-07-29

jQuery this Keyword

We look at several use cases of jQuery this keyword in different contexts. Read on to find subtle nuances to master jQuery this keyword.