Skip to content

Instantly share code, notes, and snippets.

View nekonado's full-sized avatar
🛸
👽 👽 👽 👽 👽 👽 👽

Keisuke Ozeki nekonado

🛸
👽 👽 👽 👽 👽 👽 👽
View GitHub Profile
#!/bin/zsh
# Fetch changes from the remote repository and prune (delete) remote tracking branches that no longer exist on the remote
git fetch --prune && \
# Display a list of local branches and their associated remote branches
git branch -vv | \
# Extract lines related to deleted remote branches
grep ': gone]' | \
# Extract branch names from the lines that were extracted
awk '{print $1}' | \
console.log("[1]");
setTimeout(() => {
console.log("[7]");
});
Promise.resolve()
.then(() => {
console.log("[3]");
})