Royce  Reinger

Royce Reinger

1617382740

Branching Out and Deleting Branches

It is good practice to create git branches to code on before merging it back into the master branch but did you know that you should also consider deleting those old branches?

I was cleaning up my code when it crossed my mind on whether it’s ok to reuse a git branch after merging it in with the master.

In my quest for a clear answer it turned out that I needed a better understanding of some key concepts like: Git, commits, branches and so on.

What Is Git?

It’s a version control system for source code management where each copy or repo of the code has the full history of commits and changes.

Basically, you can work on multiple versions of a project each with their own branch. Imagine several branches running parallel to each other.

Branches running parallel

#git #git-merge #coding #git-commands #git-branch

What is GEEK

Buddha Community

Branching Out and Deleting Branches
Seamus  Quitzon

Seamus Quitzon

1595201363

Php how to delete multiple rows through checkbox using ajax in laravel

First thing, we will need a table and i am creating products table for this example. So run the following query to create table.

CREATE TABLE `products` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
 `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Next, we will need to insert some dummy records in this table that will be deleted.

INSERT INTO `products` (`name`, `description`) VALUES

('Test product 1', 'Product description example1'),

('Test product 2', 'Product description example2'),

('Test product 3', 'Product description example3'),

('Test product 4', 'Product description example4'),

('Test product 5', 'Product description example5');

Now we are redy to create a model corresponding to this products table. Here we will create Product model. So let’s create a model file Product.php file under app directory and put the code below.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected $fillable = [
        'name','description'
    ];
}

Step 2: Create Route

Now, in this second step we will create some routes to handle the request for this example. So opeen routes/web.php file and copy the routes as given below.

routes/web.php

Route::get('product', 'ProductController@index');
Route::delete('product/{id}', ['as'=>'product.destroy','uses'=>'ProductController@destroy']);
Route::delete('delete-multiple-product', ['as'=>'product.multiple-delete','uses'=>'ProductController@deleteMultiple']);

#laravel #delete multiple rows in laravel using ajax #laravel ajax delete #laravel ajax multiple checkbox delete #laravel delete multiple rows #laravel delete records using ajax #laravel multiple checkbox delete rows #laravel multiple delete

I am Developer

1620616862

How to Delete Directories and Files in Linux using Command Line

In this remove or delete directories and files linux tutorial guide, you will learn how to remove empty directory and non empty directory linux using command line. And as well as how to remove/file files linux using command line.

If you work with Linux then you will need the following:

  • how to remove empty directory in linux,
  • how to remove non empty directory,
  • how to remove directory without confirmation linux
  • how to remove files with and without confirmation in linux.

So, this tutorial guide will show you you how to use the rmunlink, and rmdir commands to remove or delete files and directories in Linux with and without confirmation.

https://www.tutsmake.com/how-to-remove-directories-and-files-using-linux-command-line/

#how to delete directory in linux #how to remove non empty directory in linux #remove all files in a directory linux #linux delete all files in current directory #linux delete all files in a directory recursively #delete all files in a directory linux

Royce  Reinger

Royce Reinger

1617374940

How Do You Delete a Local Branch in Git?

This tutorial shows how to easily delete a local branch in Git to help you avoid merging unstable code into the main codebase.

t its core, the branching model offered by Git is intended to help you avoid merging unstable code into the main codebase. Working with branches in Git is a breeze, especially if you’re working with the [GitKraken] Git client to visualize your repository.

How to Delete a Git Branch Locally Using the Command Line

To delete a local branch in Git using the terminal, you’re going to run the git branch command and pass in the -d flag. Next, you will pass in the name of the branch you wish to delete.

Run the Git branch command and pass in the -d flag.

Can You Delete a Local Branch in Git if the Branch Is Checked Out?

It’s important to note Git does not allow you to delete a local branch if you have the branch checked out with unmerged changes. This helps prevent you from accidentally losing commit data.

#git #gitkraken #git branches #git branch

Royce  Reinger

Royce Reinger

1617382740

Branching Out and Deleting Branches

It is good practice to create git branches to code on before merging it back into the master branch but did you know that you should also consider deleting those old branches?

I was cleaning up my code when it crossed my mind on whether it’s ok to reuse a git branch after merging it in with the master.

In my quest for a clear answer it turned out that I needed a better understanding of some key concepts like: Git, commits, branches and so on.

What Is Git?

It’s a version control system for source code management where each copy or repo of the code has the full history of commits and changes.

Basically, you can work on multiple versions of a project each with their own branch. Imagine several branches running parallel to each other.

Branches running parallel

#git #git-merge #coding #git-commands #git-branch