douglascdev / snake

A snake game made with Python3 and Pygame!
https://www.pygame.org/project/5080
Apache License 2.0
4 stars 5 forks source link

#7 Added the score feature #13

Closed GhostUser closed 4 years ago

GhostUser commented 4 years ago

Added the score feature. Define a score update function. Update me if something needs to be changed.

douglascdev commented 4 years ago

Thank you again for contributing! So, the score was made from a previous version of the code, which would lead to a conflict with the current version of the code on my repository. Your solution was to manually commit the same changes I made on your repository, but that's not how you're suppose to fix conflicts on git. Here is what you should have done, before making your changes:

git remote add upstream git://github.com/douglas-cpp/snake.git
git fetch upstream
git pull upstream [your-branch]

After doing that, any change I made to my repository could be pulled to your fork with just:

git pull upstream [your-branch]

Which you should do before making any changes to your fork, to make sure it is up to date. I don't know what will happen if I try to merge your branch the way it is now and fix the conflicts, I think you'll rewrite everyone's commits as your own.

How to fix this

One way you could fix this is:

  1. Checkout to your master branch git checkout master
  2. Sync it with upstream, to get the changes made to my version of the repository, using the commands I mentioned:
    git remote add upstream git://github.com/douglas-cpp/snake.git
    git fetch upstream
    git pull upstream master
  3. Create a new branch from your master branch(not named GhostUser): git checkout -b new-branch
  4. Put the changes regarding the score here, commit, push and open another pull request