0

This might seem like a very simple thing to experts, but I'm new to git and finding it hard to think of keywords to search for that will come up with usable answers for me...

I need to do some programming for an embedded device which is not portable and not inside my house.

I want to write most of the code on my desktop PC which runs ubuntu, and when that code is ready and committed, sync that to the repo on my laptop (also running ubuntu), then take the laptop outside to reprogram the embedded device with.

The desktop and the laptop will be on the same wifi network when inside my house.

At this time, I don't want to use github or any external service for syncing.

How can I achieve this? Does git have some kind of server so I can pull the updates from the desktop to the laptop?

Also, if I need to make changes while I'm outside, how do I send those changes back to the desktop?

localhost
  • 1,253
  • 4
  • 18
  • 29
  • Possible duplicate of [How do I pull from another computer's repository in Git?](http://stackoverflow.com/questions/4131164/how-do-i-pull-from-another-computers-repository-in-git) – Dan Cornilescu Sep 02 '16 at 04:12

2 Answers2

1

Git can not work in P2P mode, center server is required. If you do not want to use github , you may construct your owner git server.

lepdou
  • 29
  • 3
1

After lepdou's answer, I did some more searching about git servers, and came across this answer, which uses ssh with the desktop being the master repo and cloning that onto the laptop which I think will be a good solution for me.

I can then git push origin master back to the desktop when I get back inside the house if there are any changes to send back.

localhost
  • 1,253
  • 4
  • 18
  • 29