Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git useful commands

GIT Useful commands

Keeping a clean git fork

git remote add upstream <git-url-project>
git fetch upstream
git merge --ff-only upstream/master
git pull --ff-only upstream master
git push origin master
git fetch --all

Ref: http://blog.evan.pro/keeping-a-clean-github-fork-part-1


Fetching remote

git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.