Git configures remote warehouse for the first time

Time:2021-4-27

1. Configure the global user name and mailbox

  1. git config –global user.name “shanyouyan”
  2. git config –global user.email “[email protected]

2. Configure key

  1. ssh-keygen -t rsa -C “[email protected]
  2. cat ~/.ssh/id_rsa.pub

Git configures remote warehouse for the first time
Configure the key to SSH keys of remote warehouse
Git configures remote warehouse for the first time
Git configures remote warehouse for the first time

3. Establish a warehouse

1. Initialize the warehouse

1.git init

2. Put it in the temporary storage area and submit it to the local

1. Git add
2. Git add a file name


If: warning: LF will be replaced by CRLF in ‘xxx’ error occurs, the reason is that the newline character is different when windows and Linux submit, the solution is as follows:

git config --global core.autocwenrlf false

3.

Git commit - M "first commit"
git remote add origin [email protected]:shanyouyan/shopMall.git

4.

git push (-u) origin master
If there is an authentication error, false: authentication failed for ' http://xxx/ '
Command: git push -- set upstream origin master

5. Git configuration remembers user name and password:

git config --global credential.helper store

Recommended Today

[rust] basic data type

This article introduces the built-in data types provided by rust. Boolean type Boolean typeLogical values representing yes and No. It has two values:trueandfalseGenerally used in logical expressions, and, or, and not operations can be performed: fn main() { let x = true; let y: bool = ! x; // False, inverse operation let z = […]