I created a repository on github to upload an academic project that I am doing. Install the gitbash to work on windows with the command console, set the global variables of user.name user.email .
Run the following statements
git add
git commit - m"primer commit"
git remote add origin https://github.com/cristian16b/SICU.git
The problem happens when git push
because it gives me the following error shown in the screenshot:
If you can guide me or give me any recommendation, it will be welcome. I'm taking my first steps with git. Thank you very much
I'm not an expert with github but something similar to what your error says integrate the remote changes (eg 'git pull'...) before pushing again
try making a
git pull
remote repository, maybe if you have added or modified a file from github and not from your pc, you have to bring those changes to your local and mix them with your repositorythere are 2 ways to pull changes from your github repo and then merge them with your local repo.
the first is with
git fetch [origin] [master]
origin is your remote repo and master is the master branch EYE do not put the brackets [], just put what is inside, if you have other names for the remote and the branch, then you will know that. This is to bring you the changes... and then to mix them you usegit merge
the 2nd way is easier since it brings and mixes at once and it is with
git pull [origin] [master]
after bringing you and mixing the changes you only have to do the typical thing of
git add .
,git commit -m "mensaje"
and finally thegit push [origin] [master]
Well, I hope that solves your error.