git and gitlab

1.gitlab create a project, named test2

2.git push the project

    git remote add *******

    mkdir test1

    cd test1

    git init

    nano test1.txt  --1111

   git add  test1.txt 

   git commit -m "tets1"

   git remote add origin http:********

   # If there is gitlab file, after the first pull push

   git pull origin master

   git push -u origin master

  # If gitlab no files, directly push

   git push -u origin master

3.git cloning project

 git clone http:...........

 Test2 directory created automatically

cd test2

nano data.py

git add data.py

git commit -m "data.py"

git push -u origin master

 

Guess you like

Origin www.cnblogs.com/hapyygril/p/11714959.html