5, Git initialization and warehouse creation and manipulation

Basic settings

First, any (such as the Desktop) Create a new folder (working directory) in this folder and then right below

 

Note: This setting github Depot home show who submitted the document

Initialize a new Git repository

1. Create a folder

  By command to create, create a folder named test: mkdir test

  Directory directly manually create a new folder below: Right click -> w -> f

  

2, in the folder initialize git (git repository is created, the folder into a warehouse, initialization will generate a file in the following directory)

    Command: cd test git init (represented first enter the directory, then git init)

  Or the command: cd test -> Enter -> pwd

  Or: manually test directory, right click and select Git Bash here to show the command window and then git init

  And finally generate a hidden file .git

    

Add files to the repository (see the 43 steps)

The file is added from the work area to the staging area, and then submitted to the warehouse from scratch

This all with the following operation to operate linux

You can also create a1.php manual

Now delete the file you just created

After re-create a1.php, and submit files to the staging area

 

The submission of documents to the staging area of ​​the warehouse

This put the submission of documents to the warehouse,

First, create a file (right-click to create under windows)

Then add to the staging area git add filename

Into the repository git commit -m 'filename'

Modify the file repository

Linus command: find Chi Chuan official website ----- php ---- ---- PHP_linux video download video tutorials

Command: vi a1.php (open the file) or manually add content in the window

  Click to enter edit mode i Notepad to open, edit, 1111

  Wq save and then edit (video did not say specifically how to operate Clear) Save and Close

Command: cat a1.php

third step

Delete the file repository

Guess you like

Origin www.cnblogs.com/djlindex/p/11257316.html