I've done some research to find out what the differences are but I still haven't found a reason why my repo wasn't being updated properly with a git pull origin master, when I've seen changes being fetched and merged into my branch with that method before. I wonder how many changes I haven't been seeing because of this quirk I discovered. You have created a new repository, added a few commits to it, and now you are trying to pull from a remote repository that already has some commits of its own. Why did a git pull origin master not work, but a git pull did? Merge execute because you was on master branch, and not your local b1 branch. See : Basically git pull is a shortcut to git fetch & git merge. Then I did a normal git pull and then saw all of my coworkers changes rolling in and merging with my local master branch. You can use git fetch origin b1 to only fetch remote branch without merge. I did a git pull origin master like always, and got the message that said "Already up-to-date." I've been running into some merging issues lately though, so I did an experiment. So I've been doing git pull origin master when I want to fetch and merge the projects changes from the remote master copy and bring them to my local master. Now, hopefully, that won't get any new versions of the files you're worried about. If this branch is on the remote repository, you have to push your changes. ![]() git merge master // Now your branch is in sync with the local Master branch. ![]() ![]() So I ran into a peculiar problem this morning, and I was wondering if the community could help me figure it out. That will save away your local updates into the stash, then revert your modified files back to their pre-edit state. To fix that: Checkout the branch that is behind your local Master branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |