git Getting Started

Now, I assume you have installed the Windows version of git. Right -> Git Bash Here to open the git tool.

git basic commands

mkdir create a folder

Create a file touch

git init to create a local warehouse

Git diff to see the changes before and after staging

git status to view the status of asking price

ssh-keygen -t rsa "[email protected]"

ssh -T [email protected] test connection

Adding content git add filename to the next submission


 Cloning project

1. Go to a local folder, mkdir to create a folder to create the library

2. git init to create a repository

The Add Remote origin git 3. [email protected]: zhoujianghai / .git the HelloWorld (path own adaptation) designated warehouse name for origin

4. git clone

5. ls View cloning project


Upload the entire project

1. Test Connection: ssh -T [email protected]

2. Add content to this submission: git add.

3. Add the contents of the cross: git commit -m "Remarks"

4. Push submit to GitHub: git push -u origin master (or git push carriage return, will pop up github login window will automatically upload login)


 To upload a file

1. Test Connection: ssh -T [email protected]

2. Add content to this submission: git add filename

3. Add the contents of the cross: git commit -m "Remarks"

4. Push submit to GitHub: git push -u origin master (or git push carriage return, will pop up github login window will automatically upload login)


 

Guess you like

Origin www.cnblogs.com/yocichen/p/11101622.html