How can I push a git repo to a remote server through ssh?

Győri Sándor

I have a remote server which I can access through SSH. How can I push my local git repo there? The server doesn't have git installed, I want to do everything from my IDE (PhpStorm)

So far the only solution for me is to sync the local repo's directory with the one on the remote server with WinSCP but that's messy and I don't want another application for a job what git supposed to do.

user2521387

Indeed, the remote server needs to have .git installed. There is no way around it!

If the server has .git installed, you can add a remote repository from your local machine. You can do this by typing git remote add branchname [email protected]/path/to/your/repo.git into your terminal.

This command will connect your local repository to your remote server, where your website is sitting. No need for a git account.

This guy explains it really well.

https://www.youtube.com/watch?v=9qIK8ZC9BnU

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I push a git repo to a remote server through ssh?

From Dev

How do I pull from a git repo on a remote machine through ssh?

From Dev

Can I add a file to my local Git repo but not push it to remote

From Dev

How can I create a bash or zsh alias for git commit, git pull, git push and pull on a remote server?

From Dev

Pycharm -- how can I push a local project to a remote organization repo?

From Dev

How can I push a branch into a separate remote repo?

From Java

Git push existing repo to a new and different remote repo server?

From Dev

How can I grant access to a remote git repo?

From Dev

How can I reach a remote ssh server through my http proxy (80 port)?

From Dev

Can SSH into server but not git push

From Dev

git - How can I tell where a repo will "push" to?

From Dev

How can I ignore big files and push to git repo

From Dev

git - How can I tell where a repo will "push" to?

From Dev

Git pass variable through push to remote server

From Dev

SSH push to git from remote server

From Dev

Can the Spring Cloud Config Server also push config updates to the remote git repo?

From Dev

Can't push a git repo on a local server

From Dev

How do I push a new repo to a remote?

From Dev

How can I automatically push the data to a git-repo when it's pushed to a bare git repo?

From Dev

How can I automatically push the data to a git-repo when it's pushed to a bare git repo?

From Dev

how can I execute command through ssh, remote is windows

From Dev

Push git alias to remote repo

From Dev

Failure to push to remote repo in Git

From Dev

How can I build my local git repo on external server?

From Dev

How can I push a Git repository to a folder over SSH?

From Dev

How can I secure my SSH commands to a remote server in Laravel?

From Dev

How can I ssh to a remote server with an automated password and no key?

From Dev

From node how can I check if a remote server is running ssh?

From Dev

How can I connect to a remote X server _without_ ssh?

Related Related

  1. 1

    How can I push a git repo to a remote server through ssh?

  2. 2

    How do I pull from a git repo on a remote machine through ssh?

  3. 3

    Can I add a file to my local Git repo but not push it to remote

  4. 4

    How can I create a bash or zsh alias for git commit, git pull, git push and pull on a remote server?

  5. 5

    Pycharm -- how can I push a local project to a remote organization repo?

  6. 6

    How can I push a branch into a separate remote repo?

  7. 7

    Git push existing repo to a new and different remote repo server?

  8. 8

    How can I grant access to a remote git repo?

  9. 9

    How can I reach a remote ssh server through my http proxy (80 port)?

  10. 10

    Can SSH into server but not git push

  11. 11

    git - How can I tell where a repo will "push" to?

  12. 12

    How can I ignore big files and push to git repo

  13. 13

    git - How can I tell where a repo will "push" to?

  14. 14

    Git pass variable through push to remote server

  15. 15

    SSH push to git from remote server

  16. 16

    Can the Spring Cloud Config Server also push config updates to the remote git repo?

  17. 17

    Can't push a git repo on a local server

  18. 18

    How do I push a new repo to a remote?

  19. 19

    How can I automatically push the data to a git-repo when it's pushed to a bare git repo?

  20. 20

    How can I automatically push the data to a git-repo when it's pushed to a bare git repo?

  21. 21

    how can I execute command through ssh, remote is windows

  22. 22

    Push git alias to remote repo

  23. 23

    Failure to push to remote repo in Git

  24. 24

    How can I build my local git repo on external server?

  25. 25

    How can I push a Git repository to a folder over SSH?

  26. 26

    How can I secure my SSH commands to a remote server in Laravel?

  27. 27

    How can I ssh to a remote server with an automated password and no key?

  28. 28

    From node how can I check if a remote server is running ssh?

  29. 29

    How can I connect to a remote X server _without_ ssh?

HotTag

Archive