Skip to content

Instantly share code, notes, and snippets.

View walkerdepaula's full-sized avatar

Walker de Paula walkerdepaula

View GitHub Profile
@walkerdepaula
walkerdepaula / fetch-git-local-to-remote.md
Created October 1, 2020 17:57
[GIT] Prune local tracking branches that do not exist on remote anymore

(requires bash or zsh, won't work with standard Bourne shell)

After pruning, you can get the list of remote branches with git branch -r. The list of branches with their remote tracking branch can be retrieved with git branch -vv. So using these two lists you can find the remote tracking branches that are not in the list of remotes.

1:

$ git fetch --prune

2:

@walkerdepaula
walkerdepaula / host.txt
Last active November 29, 2019 15:41
Meli host's config
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 dev.mercadolibre.com.ar
127.0.0.1 dev.mercadolivre.com.br
127.0.0.1 dev.mercadolibre.com.mx
127.0.0.1 dev.mercadolibre.com.co
127.0.0.1 dev.mercadolibre.com.ve
127.0.0.1 dev.mercadolibre.com.uy
127.0.0.1 dev.mercadopago.com.ar
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
@walkerdepaula
walkerdepaula / gist:70eb757cc3447323ebccc49689eabd43
Created December 13, 2018 17:57 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream