Create a Git repository in an openSUSE box

First of all, you should install the package git-core, provided in the update repository.

You can get the package by using a 1-click link or typing in a terminal:

su -c 'zypper in git-core'

After Zypper ends installing git, we can start preparing the environment:

  1. Create the repository folder.mkdir repo_folder
  2. Enter that folder by typing cd repo_folder.
  3. Init the empty git repo git --bare init
  4. Add some files to the folder, and add them to the repository git add *
  5. Lets do the first commit! git commit -m 'First Repo commit'
  6. If you want to get some project source, you should enter git clone url_to_git_repo

And you have your repository working (locally).

Next step: connect it to the world! (in a future post 😉 )

Have a lot of fun!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.