Push git to server repo

But you want a server? There are some git services.

  1. Github
  2. BitBucket
1$ git remote add origin ssh://.......

Then every time when your local code are ready to push to the others:

1$ git push origin master

Or use self hosted git service

  1. You need a server, or VPS
  2. SSH access
  3. Setup Git repo

We have used git init to make the current folder a git managed repo, with all the git controlling files put inside a .git directory. When we are creating our now git repo for others to use, we just want those git controlling files by using the --bare option.

1$ mkdir a-new-repo.git
2$ cd a-new-repo.git
3$ git init --bare

Git is something powerful yet not easy to learn. Here are more resources to help you get started.

  1. Git Book
  2. Git flow

What’s next? We’re going to take a look at “Deploying options”.

overlaied image when clicked on thumbnail

Makzan | Ruby on rails 101 | Table of Content