Skip to content

Instantly share code, notes, and snippets.

View edenjp's full-sized avatar
🏠
Working from home

Éden Pereira edenjp

🏠
Working from home
View GitHub Profile
@fabioperrella
fabioperrella / git_clean_merged_branches
Last active November 26, 2023 23:24
Bash script to clean git merged branches (local and remote). Thanks to Eron Junior to introduce me the command "git fetch -p"
#!/bin/sh
set -xe
git checkout master
git fetch
git pull
git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | cut -d"/" -f2- | xargs git push origin --delete || true
git branch --merged | grep -v master | xargs git branch -d || true
git fetch -p
@cortesben
cortesben / hg-commands.md
Last active March 6, 2025 14:58
Mercurial command cheat sheet

Mercurial Commands

Commands Description
hg pull get latest changes like git pull use flags like -u IDK why yet
hg add only for new files
hg commit add changes to commit with -m for message just like git
hg addremove adds new files and removes file not in your file system
hg incoming see changes commited by others
hg outgoing see local commits