【项目文件GitHub操作】(二)

GitHub的使用方法

  1. 创建一个文件夹,并进入文件夹
    mkdir program
    cd program
    
  2. 将GitHub的项目整个拉下来
    $ git clone [email protected]:FeiPF2020/DataStructure_algorithm.git
    
  3. 对项目中的文件进行修改
  4. 添加到本地仓库
    $ git add .
    
  5. 提交到本地仓库
    $ git commit -m "second"
    
  6. push远程的GitHub仓库
    $ git push -u [email protected]: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 [email protected]:FeiPF2020/CurveFitting.git
git push -u origin main

…or push an existing repository from the command line

git remote add origin [email protected]: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.

猜你喜欢

转载自blog.csdn.net/Android_WPF/article/details/126220308