Skip to content

Instantly share code, notes, and snippets.

View serant's full-sized avatar

Seran Thirugnanam serant

  • Microsoft
  • Redmond, WA
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 18:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
roles:
- admin
- developer
- guest
password:
@krshnpatel
krshnpatel / Git Sync Local Branches with Remote.md
Last active October 17, 2024 10:56
A simple script to help you sync your local branches with your remote branches.

Overview

Description

This script allows you to sync your local branches with your remote branches. It would detect any local branches that have been deleted on your remote repository. Any local branches that have not been pushed to remote will not be detected because they might be your "work in progress" branches.

NOTE: If you create a local branch, then push it to your remote repository, then you manually delete that branch on your remote repository. This script will detect that local branch. So I would suggest reading the list of branches marked for deletion before allowing this script to delete them.

Purpose

Usually it's a good practice to delete your remote branch after it has been merged to your default branch (i.e. main, master). However, this means that there will be several stale local branches and these will accumulate over time. Essentially, this script will help you delete those stale local branches which have been deleted on the remote repository.