Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
Delete Git Branches - PC✗3
Delete Git Branches

Delete Git Branches

Below are some steps to clean branches from the git repository to remove the clutter.

Delete a Local branch

To delete the local branch in Git using the command, we can use one of the followings:

# git branch -d branch_name
# git branch -D branch_name

As you can see above, we have 2 different arguments, one with small case d and one with capital case D.

The -d option stands for –delete, which would delete the local branch. The -D option stands for –delete –force, which deletes the branch even if there are uncommitted changes.

Delete a remote branch

To delete a remote branch, we can use the following command:

# git push {remote_name} –delete {branch_name}

Above command can also be used if we want to delete git tags.

You can get more commands from this Git Cheat Sheet.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.