GitHub的使用方法
-
创建一个文件夹,并进入文件夹
mkdir program cd program
-
将GitHub的项目整个拉下来
$ git clone git@github.com:FeiPF2020/DataStructure_algorithm.git
-
对项目中的文件进行修改
-
添加到本地仓库
$ git add .
-
提交到本地仓库
$ git commit -m "second"
-
push远程的GitHub仓库
$ git push -u git@github.com:FeiPF2020/DataStructure_algorithm.git
参考官文档
…or create a new repository on the command line
echo "# CurveFitting" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:FeiPF2020/CurveFitting.git
git push -u origin main
…or push an existing repository from the command line
git remote add origin git@github.com:FeiPF2020/CurveFitting.git
git branch -M main
git push -u origin main
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.