The first step is
to create a local directory (for example: git-test), enter the directory, right-click to execute Git Bash Git
The second step
execution git init
at this time will be more a .git directory folder
Step
3 Create a new file in the directory such as: txt.txt
Then run
git add .
git add is to add files to the warehouse
git commit -m "添加代码"
git commit is to submit the staging area to the local warehouse.
Step 4 Upload the local staging area to the remote warehouse
git remote add origin https://gitee.com/****/test-git.git /// https://gitee.com/****/test-git.git git 仓库地址
git remote add origin uploads the local staging area to the remote warehouse
Then go to the warehouse address to check whether the upload is successful. The success is as follows
Operation complete...
Expand
Easy command line tutorial:
Git global settings:
git config --global user.name “****”
git config --global user.email " ***"
Create a git repository:
mkdir test-git
cd test-git
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/****/test-git.git
git push -u origin master
Already have a warehouse?
cd git-dir
git remote add origin https://gitee.com/****/test-git.git
git push -u origin master