1、 Create a local warehouse

mkdir dir
cd dir
git init Initialize the repository

2、 Creating a remote repository

 Go to the remote repository to create 

3、 Associate local warehouse with remote warehouse

git remote add osc git::... osc It's a remote server alias ,git::... Refers to the remote warehouse git Address 

4、 Basic use

1、 Add and modify files, etc 
2、 Use git add ... Add file to index (git rm/mv remove / Move )
3、 Use git commit -m " notes " file To submit
4、 Use git push osc To submit to the remote repository

Here is just a brief introduction , Detailed use reference http://git.oschina.net/oschina/git-osc/wikis/Home

osc Of git The server is easy to use . More articles about

  1. It's easy to build an unlimited access git Server usage git-daemon Script

    If you want to use ubantu Set up unlimited permissions ( That is not applicable gitosis) Simple git The server , Realization git Library Download clone,push And so on , You can use it directly git-daemon Script ( It's very unsafe , Suggested project code ...

  2. Ubuntu 14.04 It's easy to build git The server

    /****************************************************************************** * Ubuntu 14.04 It's easy to build gi ...

  3. linux Simple construction git The server

    If you use git There are fewer of them , You can use the following steps to quickly deploy a git Server environment . 1. Generate SSH Public key Everyone needs to use git The engineer of the server , I need to generate a ssh Public key into your own ~/.ssh Catalog , See if it works ...

  4. The simplest windows platform Git The server ---Gitstack 【 turn 】

    from :http://www.360doc.com/content/12/0503/11/1016783_208316518.shtml Currently in windows On the platform git Most servers use CopSSH+ ...

  5. Centos6.4 build Git The server ( The easiest way )

    download git-1.8.2.tar.gz tar -zvxf git-1.8.2.tar.gz cd git-1.8.2.2 sudo make prefix=/usr/local/git all su ...

  6. ( turn ) Beginners Git And simple construction git Servers and clients

    It's finally done ,mac Do it yourself git The server ,mac It's also a client , How to avoid registration From the other linux The upload public key of the server is prompted ssh-copy-id -i ~/.ssh/id_rsa.pub git@192.168 ...

  7. How to build git The server

    One . Preface Now more and more companies use git Version control , however git It's open source by default , If it's private, you need to pay , If you don't want to pay, you can build one yourself git The server is used for version control . Two . Server side operation 1. install git sudo ...

  8. version control -Git Server building and common command use

    Git It is the most advanced distributed version control system in the world ( Not one of them. ). Use Svn Please refer to < version control -svn Server building and common commands (centos 6.3)>, Let's introduce Git Common commands Common commands Simple version l ...

  9. build Git The server

    In the remote warehouse section , We talked about the fact that a remote warehouse is no different from a local warehouse , Just for 7x24 Turn on your computer and exchange your changes . GitHub Is a free hosting of open source code remote warehouse . But for some business companies that look at source code like life , I don't want to ...

Random recommendation

  1. Total Commander Decompression location

    TC Unzip to the current folder TC It took a while , I'm used to it now , Today, when decompressing the file, I feel that the steps are troublesome , Before decompressing, it was decompressed to another window , So it's always been ALT+8 Synchronization window , Then extract the file . But generally, the unzipped files are unzipped to ...

  2. php5.6+apache2.4 Environment configuration

    Apache2.4 Environmental Science :https://www.microsoft.com/en-US/download/details.aspx?id=48145php5.6 Environmental Science :http://www.micr ...

  3. protocol buffer c++ python Libraries installed

    c++ Library installation is simple , Don't use source code , You have to download it , It's a wall https://github.com/google/protobuf/releases   Download the latest release install #protoc -- ...

  4. 【leetcode】Divide Two Integers (middle)*

    Divide two integers without using multiplication, division and mod operator. If it is overflow, retu ...

  5. Python Module hashlib modular 、logging modular

    One .hashlib modular hashlib Module introduction :hashlib This module provides a summary algorithm , for example MD5.hsa1 Abstract algorithm is also called hash algorithm , It's through a function , Convert data of any length into a data string of fixed length , This ...

  6. Connect mysql Database error java.sql.SQLException: The server time zone value &#39;�й���׼ʱ��&#39; is unrecognized... resolvent

    Connect today mysql The database error is as follows : java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or r ...

  7. 【poj 1087 a plug for UNIX】

    With the help of rice cakes , Finally found the rice cake program as rice cake general error ! The test site is in question transformation , Then run a maximum flow algorithm that you like ( Bipartite graphs can be ?) Another example : [ Hand painted rice cake pictures ] Some of them are 1, Otherwise, it would be in ...

  8. Rookie series docker——docker Basic concepts (1)

    docker Basic concepts 1. Get ready Here's container technology , I'll introduce you later docker.docker It's a kind of container , except docker outside , There is still coreos. But in the current trend, containers and docker Basically, it can be divided into equal sign . ...

  9. Python-random modular -59

    random modular : Random number module >>> import random # Random decimal >>> random.random() # Greater than 0 And less than 1 Decimal between 0.76643 ...

  10. Java 8 New characteristics ---------Stream

    Java 8 API Added a new abstraction called flow Stream, Allows you to process data in a declarative way . Stream Use a similar SQL Statement provides an intuitive way to query data from a database Java Higher order abstraction of set operation and expression ...