git-related commands

Reference address

    http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html

 

1. Compare command with server

1. Check the status

git status

 

2. Submit to the local warehouse

git commit -m "update"

 

3. Submit the file to the server

Syntax: git push origin (version)

git push origin wanrong_1223

 

4. Add

git add

 

5. Pull the code from the server

git clone [email protected]:wanrong/admin-web.git -b wanrong_1223

 

2. General orders

 

1. Set the username

git config --global user.name "xiongmin_1"

 

2. Set a password

git config --global user.email "[email protected]"

 

3. Set the key

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

 

4. Test the connection

$ ssh -T [email protected]

Enter and then need to enter password

 

 

5. Convert the project into a maven project

mvn eclipse:eclipse

mvn clean eclipse:eclipse

 

6. View the previously executed command

$ history

 

7. Play the local package

mvn clean install -Dmaven.test.skip=true

mvn clean install -Dmaven.test=true

mvn clean install -Dmaven.skip.test=true

 

8, packaged into a war package

mvn clean package -Dmaven.test.skip=true

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326486215&siteId=291194637