How to sync git remotes

I managed to mess up my remotes and would like to get back in sync with origin. I have previously deleted all remotes and have manually re-added them.

My remotes are:

  • Undo git reset HEAD~3
  • git svn rebase index file open failed : Invalid argument
  • Push local merge to Gerrit Code Review
  • gitignore new file content not working
  • Chef passing revision variable to deploy resource
  • Make git reset --hard to ignore permission changes
  • $ git remote -v show
    origin (fetch)
    origin (push)
    truekonrads (fetch)
    truekonrads (push)

    I would like to update origin/master to latest version and then merge truekonrads/mirv-events branch into master. How do I do it?

    is it possible to do it in a fashion that github keeps track of origin?

  • Master failed to write error while pushing commit
  • How to remove git user from config?
  • Changing commit message and user ID info in already checked in code
  • How to do code review for google cloud git repo
  • How do I find removed lines with git?
  • Remove empty commits in git
  • One Solution collect form web for “How to sync git remotes”

    To “update origin/master to latest version”:

    git fetch origin master

    To “merge truekonrads/mirv-events branch into master”:

    git checkout master
    git merge truekonrads/mirv-events

    Not sure what you mean by github keeping track of origin. Your local repository is keeping track of origin. You could git remote add github <URL>; git push github origin/master:latest_origin_master to push a copy of origin/master up to github for safekeeping under the name latest_origin_master, but it’s not clear if that’s what you’re wanting, especially since both origin and truekonrads are already on github.

    Given your output above, it seems that origin and truekonrads are defined identically, which is redundant.

    Git Baby is a git and github fan, let's start git clone.