• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to create new repository in self hosted Git Server

December 29, 2013 by Sharad Chhetri Leave a Comment

How to create new repository in self hosted Git Server

In this tutorial we will learn,how to create new repository in self hosted Git Server.Previously, I have written a post on setting own git server in CentOS and Ubuntu.

Follow the given below steps to create new repo in self hosted Git Server

Step 1: Login to Server with root and then switch to Git Server user which maintains the Git.

Note: Here, existing user name is git,which we are using in Git Server,if you have any other user replace the word git from command

ssh root@server-IP-address

su -l git     

Step 2: Now change to repository directory. Create a new directory for repository (use .git as suffix with repo name,eg. test-repo.git)
Change to new repo directory and initialize the git for the new repo.And then run the command
git update-server-info for updating the Git Server information.


$ cd repositories
$ mkdir test-repo.git
$ cd test-repo.git
$ git --bare init
$ git update-server-info

Now new git repository is created.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to create own Git Server with Gitolite and Gitweb in Ubuntu
  2. Setup self signed ssl certificate on Owncloud 6 in Ubuntu 14.04 LTS Server
  3. How to install own git server with ssh and http access by using gitolite and gitweb in CentOS
  4. How to configure self signed SSL certificate in owncloud Ubuntu
  5. Setup Owncloud 6 with self signed SSL certificate on Ubuntu 13.10
  6. Disable user self registration in Bugzilla
  7. Setup self signed SSL certificate for ghost blog on Nginx
  8. How to write description of git repo
  9. How to remove file and directory from Git repo
  10. Install and upgrade to latest Git version on Ubuntu/Debian/Linux Mint

Filed Under: Git Server Tagged With: git

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Linux Commands

vi : Edit file without opening it

How to rename and move the directory and files in linux

cat,sed and awk commands to display file contents

How to find installation date and time of rpm package

How to install libxml2 and libxslt packages on CentOS 6.5

Useful tail command with examples in Linux/Unix

Eject Command: Eject DVD-ROM Or CD-ROM In Linux

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

Change default editor of crontab in Ubuntu

How to reset forgot root password in CentOS 6.x and Redhat 6.x

How to set JAVA environment variables in Linux or CentOS

How to encode and decode the strings with base64

This kernel requires an x86-64 CPU but only detected an i686 CPU

Print double hyphen sign simultaneously in post of Octopress

30 useful Linux terminal keyboard shortcuts

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy