简体   繁体   中英

How can I execute git commands (pull, push) on my home computer from a remote computer without installing software on the client?

Essentially, I'm trying to build a web server on my home desktop.

However, I find that I am out and about quite often, so it would be nice to be able to use my laptop to edit the code on GitHub, push it to the cloned repository on my home computer, and restart the server with the changed code.

I'm building a node.js server, so all I have to do to run it is type git pull and then node app.js into the bash terminal.

I'm basically wondering if it is possible to use a different computer to execute those commands remotely.

One constraint is that although my desktop can install any software required, my laptop cannot due to a lack of administrator permissions (it's a school-issued laptop).
Also, I run windows 10 home, so enabling RDP is nearly impossible or laggy at best.

If possible, it would be nice to do the pushing to my desktop via the GitHub site. Is it possible?

It would be nice to do the pushing to my desktop via the GitHub site.

All you can do "via the GitHub site" is declared a webhook on push event .
That webhook can send a push payload on any IP you want.

If your laptop can exposes a public IP (or has a secure tunnel to localhost ) with a listener (like that npm listener ), it can ben notified and pull from the GItHub repo whenever there is a push.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM