Austin Stehling Austin Stehling - 2 months ago 16
Git Question

Github, How to add/update/delete from same Repo on Multiple Machines

I am working on a large project, and have two computers I'll be using to do so. I created the initial project on my iMac, and want portability to work on it with my laptop.

So far I cloned the repo, using:

git clone

I delete a few folders and go to push to URL of inital repo:

git remote add origin remote repository URL

git push -u origin master

I get an error

Updates were rejected because the tip of your current branch is behind

I am assuming this is because I deleted some files. So I do

git fetch

Try again and the same keeps happening. It's going to be a real pain if I cant work on this project on multiple machines. Any help would be appreciated.

Answer Source

You need to merge the remote branch into your current branch by running git pull