Skip to content

Instantly share code, notes, and snippets.

@lcuevastodoit
Last active April 15, 2022 17:35
Show Gist options
  • Save lcuevastodoit/0fe57bdadf0fa99ff7cb1b72bf3cb071 to your computer and use it in GitHub Desktop.
Save lcuevastodoit/0fe57bdadf0fa99ff7cb1b72bf3cb071 to your computer and use it in GitHub Desktop.
Git Fetch from All Branches
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git fetch --all
### if you need stash before
git stash
git pull
git stash pop
### if there are conflicts when stash pop
git checkout stash -- .
git commit
###if you need tracking
git pull
#There is no tracking information for the current branch.
#Please specify which branch you want to merge with.
git branch --set-upstream-to=origin/<branch> <local_branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment