![]() But you havent pushed your changes to the remote yet. The git status message indicates that everything in your upstream has already been merged with your local master. I had to do an emergency git pull origin master to recover, which (thankfully) got the system back working but left my status in this unstable state. The command you typed was git pull upstream master.That command fetches and then merges changes from the upstream to your local branch. This actually broke my site by checking out some other version of the code. You can do a git fetch at any time to update your remote-tracking branches under refs. I was expecting this to bring the remote master into my local master. In the simplest terms, git pull does a git fetch followed by a git merge. Things I have tried which haven't worked: git fetch origin master:master ![]() ![]() However, I can't see where these changes come from: taking a file that I know well and looking at its history, I can see that the version shown by git log is exactly as it should be looking at the version on Github. git fetch origin master git merge -s recursive -X theirs origin/master. If I try to look at details using git diff master origin/master, I can see a large number of files listed. git add git commit -a -m 'local file server commit message'. This isn't correct - I haven't made any commits that need publishing. # (use "git push" to publish your local commits) # Your branch is ahead of 'origin/master' by 74 commits. If you want to pull a different branch other than master, you need to define that.I have recently changed my code to be hosted on Github, and have been deploying it onto my live site using: git pull origin masterĮverything works OK, except for git status, which shows: # On branch master HEAD is now at 76637bf fix truncate issue Here was my exact shell session (with a few git pull errors redacted) $ git pull You can confirm that you’ve been reset by running a git pull: $ git pull They will be available in case you want them back at a later point. HEAD is now at 76637bf fix truncate issue Confirmation: There are two ways to achieve this: a) Saving Local Changes on a Stash If you want to preserve your local changes, you can safely store them on a Stash.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |