0

So i created a README from github, and now that i want to push my work It tells me to pull the changes first from the remote repository because it's different than my local repository. If i do that i will lose all my progress right? Git tells me to pull the changes but i'm not sure if that will affect my code at all.

The error im getting:

hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

LuisM
  • 21
  • 5
  • 2
    You will not lose all your progress. If there are conflicts, you will be able to fix them. – ChrisMM Dec 06 '19 at 16:25
  • https://stackoverflow.com/search?q=%5Bgithub%5D+new+repository+Updates+were+rejected+because+the+remote+contains+work – phd Dec 06 '19 at 16:32

1 Answers1

1

I would suggest going through a Github/Git tutorial somewhere to understand how Git works. It's certainly a powerful tool. In short, no, you will not lose your local progress. I divert the "why" to any basic tutorial you can find on how Git works.

Daxton
  • 57
  • 6