1

The reason I want to do this is to save off some in-dev work (which I've branched off of my fork, and now my fork is safe to overwrite)

I've followed the step from this post: do a git pull to overwrite local changes which involved:

(being on my master folder)
git checkout
git reset --hard *ForkOrigin*

That worked to update disk with the style I wanted, but I also care to commit files and overwrite the past changes. As I mentioned, already branched them to save them off for now.

When I do git commit "update comment" it Errors with: pathspec 'update comment' did not match any file(s) known to git.

"git status" command reports nothing to commit.

Would someone offer help as to what command would be helpful for getting the changed files in?

Community
  • 1
  • 1
  • 2
    This is confusing to understand, in part because you are using SVN terms to describe git. Theres not checking in, theres creating commits, and pushing commits. Theres also no master folder, its just a branch - you never change folders. If I am understanding the situation, you have your local master, but some changes have been made to the remote master (probably on a repo called origin). You have fetched those changes, checked out master, and did a hard reset to match origin/master. Does that all sound correct? If not, please clarify what you mean by "higher" vs "lower" branches. – eddiemoya Aug 26 '15 at 21:26
  • When you do `git reset --hard *higherMasterBranchName*` you are essentially saying "throw away all changes on the current branch and instead, let the current branch point to the same commit as the `*higherMasterBranchName*` branch". After this, *higherMasterBranchName* and the current branch will be exactly the same. There is no need to "check in" anything. – Alderath Aug 27 '15 at 09:24
  • Thanks you your help. My apologies on the wording and terminology. See OP. I was trying to just use English to not say the wrong thing here, backfired ;) I come from TFS. I've forked a repro, and I want my master to now be what its origin is. Let's call that ForkOrigin instead of higherMasterBranchName? With **git reset --hard "ForkOrigin"**, wouldn't it be updated in github.com? They don't show the changes and there was nothing reported to commit. Hence, my fork wasn't reset. I'd delete it, but don't want to lose the work I have in a branch under it branch. Ideas to move forward? – Ryan Betker - healthNCode Aug 27 '15 at 13:59
  • **Ideas anyone?** it's still not reverted. I say that, because I'd change a new file and run a commit in VS.NET, past changes I was trying to wipe are going to be pulled down still). – Ryan Betker - healthNCode Aug 29 '15 at 11:04
  • Have been trying on this, still need some help though. Here's all I've tried thus far. first 2 did still had all my changes in the fork instead of having the original code of ForkOrigin/master http://stackoverflow.com/questions/1683531/how-to-import-existing-git-repository-into-another/ http://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream http://scribu.net/blog/resetting-your-github-fork.html (no permission to change the source repo - I can only do pull requests) – Ryan Betker - healthNCode Sep 01 '15 at 18:48

0 Answers0