I have run into a Git Snafu

I forked from the wrong repository and made changes that I want to keep on my local machine. (I’ve staged, committed and pushed on this branch as well).

Well I deleted the remote repo and forked the correct one.

I need to know how I can push the changed on my local machine to this new forked repo.

  • Can I fork another persons repo twice into my own account?
  • How do I convert existing content on a Github page to a new Jekyll theme?
  • Restrict Git Push/Pull
  • Git - folder structure problems
  • Finding the branch a given branch branched from
  • Git reference conflicts between branches (unable to update local branch)
  • Github downstream pull request?
  • accidentally discarded unstaged change
  • One Solution collect form web for “I have run into a Git Snafu”

    1. Open a new tracking branch for the remote branch on the forked repo you originally wanted to work on.

    2. Use git cherry-pick, to cherry-pick each one of your commits, individually, from the branch they were made on, into your correct branch.

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