I managed to sync up local directory with remote project (i.e. on GitHub).
But now I made some changes in local working directory and want to push those to remote location.
These are the steps I took:
git statusto see what was different from last commit.
- As expected, it named a couple of files that I had changed and 1 brand new file that i had just created.
- I added all of those files using
git add <filename>
Side question: is there a way to add all files that get identified by
git statusso I can execute
git addjust once and capture all those files?
- Then I tried to push with:
git push origin masterand got the following error:
- So after some googling (and mostly getting confused), I tried to pull:
- Then I just went down a rabbit hole that is not worth listing out in full…
Bottom line: Can someone please help me understand what I should have done in order to: upload changes made on laptop with GitHub…? Was I supposed to have created a branch first…?