I’m having a hard time grasping how I can accomplish the below task:
- I have a git repository on Computer1
- I push to a repository on GitHub
- Now I am on Computer2 that has zero footprint of this repository and I want the repository to also live on Computer2
- I want to be able to work on this repository’s code on both computers
I’m having a difficult time determining what exactly needs to happen. For Step 3, I would think I’d do a fetch or a pull, but (unless I’m reading this wrong) that only seems to pull down new and updated files. There could potentially be old files in that repository, but because Computer2 has none of them I’d want them all (I guess an actual copy of the repository).
I wouldn’t think I’d want to create a branch or fork the repository, because I’m not looking for 2 separate versions out there.
And as for Step 4, once the prior steps were complete I would think on each computer I’d just do a pull to get the updated files.
Is my understanding correct, and if not how am I to accomplish the above tasks?
You want to
clonethe github repository on Computer2.From then on, when you’re done doing work on a given computer, you’ll need to
pushyour changes to github (to update your online copy), and then when you arrive at the other computer,pullthose changes from github to the local copy to update it.