Skip to content

Instantly share code, notes, and snippets.

View pronoym99's full-sized avatar
💭
Optimising

Pronoy Mandal pronoym99

💭
Optimising
View GitHub Profile
@pronoym99
pronoym99 / gitlab-sync.ps1
Created October 31, 2025 08:24
PowerShell script to sync branches across two distinct GitLab instances
<#
.SYNOPSIS
Synchronizes GitLab repositories from a source to a target instance.
.DESCRIPTION
This function clones repositories from a source GitLab instance, processes them, and pushes the specified branch to a target GitLab instance, ensuring safe fast-forward only operations.
.PARAMETER SrcDomain
The source GitLab server domain or IP address.
@pronoym99
pronoym99 / reinforce_gitignore.sh
Created October 6, 2025 17:34
Reinforce gitignore
# 1. Remove everything from the index (but not from disk)
git rm -r --cached .
# 2. Re-add everything (now respecting .gitignore, including staging .gitignore itself)
git add .
# 3. Commit the changes
git commit -m "Apply new .gitignore rules"
# 4. Push to remote